summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2013-05-22 19:22:27 (EDT)
committer Gerrit Code Review @ Eclipse.org2013-06-03 14:41:26 (EDT)
commit1752f99a0b376d6806de5ec958d25ad96d6f88ef (patch)
treef3ffd0f9b6833f41f18eeb574ae59cd2be9ec9f2
parentf0f3e34ca584dc582bdd0670a737315da71b0321 (diff)
downloadorg.eclipse.mylyn.tasks-1752f99a0b376d6806de5ec958d25ad96d6f88ef.zip
org.eclipse.mylyn.tasks-1752f99a0b376d6806de5ec958d25ad96d6f88ef.tar.gz
org.eclipse.mylyn.tasks-1752f99a0b376d6806de5ec958d25ad96d6f88ef.tar.bz2
234784: show number of incoming changes on query tooltiprefs/changes/64/13064/2
Bug: 234784 Change-Id: I6bd257aa417922fcaad1529ee4d249e7084cb166 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=234784
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/Messages.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java27
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/messages.properties3
3 files changed, 31 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/Messages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/Messages.java
index 21b45ac..4cf08f4 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/Messages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/Messages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 Tasktop Technologies and others.
+ * Copyright (c) 2004, 2013 Tasktop Technologies and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -81,6 +81,8 @@ public class Messages extends NLS {
public static String TaskListToolTip_Total_Complete_Incomplete;
+ public static String TaskListToolTip_Incoming_Outgoing;
+
public static String TaskListView_Mylyn_context_capture_paused;
public static String TaskListView__paused_;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java
index 64a5354..32ff4b1 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 Tasktop Technologies and others.
+ * Copyright (c) 2004, 2013 Tasktop Technologies and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ package org.eclipse.mylyn.internal.tasks.ui.views;
import java.util.ArrayList;
import java.util.Calendar;
+import java.util.Collection;
import java.util.Date;
import java.util.List;
@@ -311,6 +312,25 @@ public class TaskListToolTip extends GradientToolTip {
return null;
}
+ private String getSynchronizationStateText(IRepositoryElement element) {
+ if (element instanceof ITaskContainer) {
+ Collection<ITask> tasks = ((ITaskContainer) element).getChildren();
+ if (tasks.size() > 0) {
+ int incoming = 0;
+ int outgoing = 0;
+ for (ITask task : tasks) {
+ if (task.getSynchronizationState().isIncoming()) {
+ incoming++;
+ } else if (task.getSynchronizationState().isOutgoing()) {
+ outgoing++;
+ }
+ }
+ return NLS.bind(Messages.TaskListToolTip_Incoming_Outgoing, new Object[] { incoming, outgoing });
+ }
+ }
+ return null;
+ }
+
private String getStatusText(IRepositoryElement element) {
IStatus status = null;
if (element instanceof AbstractTask) {
@@ -496,6 +516,11 @@ public class TaskListToolTip extends GradientToolTip {
addIconAndLabel(composite, image, incommingText);
}
+ String synchronizationStateText = getSynchronizationStateText(currentTipElement);
+ if (synchronizationStateText != null) {
+ addIconAndLabel(composite, null, synchronizationStateText);
+ }
+
ProgressData progress = getProgressData(currentTipElement);
if (progress != null) {
addIconAndLabel(composite, null, progress.text);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/messages.properties
index 5119f82..31bbcd8 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/messages.properties
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2009, 2010 Tasktop Technologies and others.
+# Copyright (c) 2009, 2013 Tasktop Technologies and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -40,6 +40,7 @@ TaskListToolTip_Scheduled=Scheduled: {0}
TaskListToolTip_Some_incoming_elements_may_be_filtered=Some incoming elements may be filtered,\nfocus the view to see all incomings
TaskListToolTip_Synchronized=Synchronized: {0}
TaskListToolTip_Total_Complete_Incomplete=Total: {0} (Complete: {1}, Incomplete: {2})
+TaskListToolTip_Incoming_Outgoing=Incoming: {0}, Outgoing: {1}
TaskListView_Mylyn_context_capture_paused=Mylyn context capture paused
TaskListView__paused_=(paused)