Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2015-09-19 05:09:43 -0400
committerSam Davis2015-09-25 13:00:47 -0400
commit457b0c7c59ec26790cde73e4f05a53ccacc8fdf7 (patch)
tree8d6a96f5ba34fd990393153829cfe7bfca3ee33c
parent8c33a103141ab406f2274fd6a7ea5033ef1f7aad (diff)
downloadorg.eclipse.mylyn.tasks-457b0c7c59ec26790cde73e4f05a53ccacc8fdf7.tar.gz
org.eclipse.mylyn.tasks-457b0c7c59ec26790cde73e4f05a53ccacc8fdf7.tar.xz
org.eclipse.mylyn.tasks-457b0c7c59ec26790cde73e4f05a53ccacc8fdf7.zip
442340: make UI legend easily discoverable
Change-Id: I594cb8e3783561d2af766db8d1dd90d7fbb37a31 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=442340
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/Messages.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java34
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/messages.properties1
3 files changed, 32 insertions, 5 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 c64a2cd76..0e5e61efd 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
@@ -51,6 +51,8 @@ public class Messages extends NLS {
public static String TaskListFilteredTree_Select_Working_Set;
+ public static String TaskListFilteredTree_Show_Tasks_UI_Legend;
+
public static String TaskListFilteredTree_Workweek_Progress;
public static String TaskListSorter_Catagory_and_Query;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
index b4c3bc4f5..d028b9641 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.layout.TreeColumnLayout;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
@@ -28,6 +29,7 @@ import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.commons.ui.SelectionProviderAdapter;
import org.eclipse.mylyn.commons.workbench.AbstractFilteredTree;
+import org.eclipse.mylyn.commons.workbench.WorkbenchUtil;
import org.eclipse.mylyn.commons.workbench.search.SearchHistoryPopupDialog;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener;
@@ -39,6 +41,7 @@ import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskDialogAction;
import org.eclipse.mylyn.internal.tasks.ui.actions.RepositoryElementActionGroup;
import org.eclipse.mylyn.internal.tasks.ui.actions.TaskWorkingSetAction;
+import org.eclipse.mylyn.internal.tasks.ui.dialogs.UiLegendDialog;
import org.eclipse.mylyn.internal.tasks.ui.editors.TaskListChangeAdapter;
import org.eclipse.mylyn.internal.tasks.ui.search.AbstractSearchHandler;
import org.eclipse.mylyn.internal.tasks.ui.search.AbstractSearchHandler.IFilterChangeListener;
@@ -64,6 +67,7 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.events.IHyperlinkListener;
import org.eclipse.ui.forms.widgets.ImageHyperlink;
@@ -144,8 +148,8 @@ public class TaskListFilteredTree extends AbstractFilteredTree {
}
if (taskProgressBarWorkingSetListener != null) {
PlatformUI.getWorkbench()
- .getWorkingSetManager()
- .removePropertyChangeListener(taskProgressBarWorkingSetListener);
+ .getWorkingSetManager()
+ .removePropertyChangeListener(taskProgressBarWorkingSetListener);
}
actionGroup.setSelectionProvider(null);
activeTaskMenuManager.dispose();
@@ -326,9 +330,9 @@ public class TaskListFilteredTree extends AbstractFilteredTree {
+ "\n" //$NON-NLS-1$
+ MessageFormat.format(Messages.TaskListFilteredTree_Estimated_hours, completeTime,
completeTime + incompleteTime)
- + "\n" //$NON-NLS-1$
- + MessageFormat.format(Messages.TaskListFilteredTree_Scheduled_tasks, completeTasks,
- totalTasks));
+ + "\n" //$NON-NLS-1$
+ + MessageFormat.format(Messages.TaskListFilteredTree_Scheduled_tasks, completeTasks,
+ totalTasks));
}
}
});
@@ -604,4 +608,24 @@ public class TaskListFilteredTree extends AbstractFilteredTree {
return null;
}
+ @Override
+ protected Composite createAdditionalControls(Composite parent) {
+ Composite container = new Composite(parent, SWT.NULL);
+ GridLayoutFactory.fillDefaults().applyTo(container);
+
+ ImageHyperlink showUILegend = new ImageHyperlink(container, SWT.NONE);
+ showUILegend.setImage(CommonImages.QUESTION.createImage());
+ showUILegend.setToolTipText(Messages.TaskListFilteredTree_Show_Tasks_UI_Legend);
+ showUILegend.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
+ UiLegendDialog uiLegendDialog = new UiLegendDialog(WorkbenchUtil.getShell());
+ uiLegendDialog.open();
+
+ }
+ });
+
+ return container;
+ }
+
}
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 605a40e66..5fd422036 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
@@ -24,6 +24,7 @@ TaskListFilteredTree_Scheduled_tasks=\ Scheduled tasks: {0} of {1} scheduled
TaskListFilteredTree_Search_repository_for_key_or_summary_=Search repository for key or summary...
TaskListFilteredTree_Select_Active_Task=Select Active Task
TaskListFilteredTree_Select_Working_Set=Select Working Set
+TaskListFilteredTree_Show_Tasks_UI_Legend=Show Tasks UI Legend
TaskListFilteredTree_Workweek_Progress=Workweek Progress
TaskListSorter_Catagory_and_Query=Category and Query
TaskListSorter_Catagory_and_Repository=Category and Repository

Back to the top