summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2011-12-24 04:46:09 (EST)
committerSteffen Pingel2011-12-24 04:46:09 (EST)
commit41e629127a4b56f6223fa353a31854885be27c5b (patch)
tree0f5209da046cb9bd88130eecf7a6ca3b471e741c
parentfaa2ddc5a13228d145ed15f760f786398de23211 (diff)
downloadorg.eclipse.mylyn.tasks-41e629127a4b56f6223fa353a31854885be27c5b.zip
org.eclipse.mylyn.tasks-41e629127a4b56f6223fa353a31854885be27c5b.tar.gz
org.eclipse.mylyn.tasks-41e629127a4b56f6223fa353a31854885be27c5b.tar.bz2
NEW - bug 356397: [patch] task trim menu: replace active task with "open
active task" option at the bottom of the menu https://bugs.eclipse.org/bugs/show_bug.cgi?id=356397
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/Messages.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java9
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/messages.properties1
3 files changed, 11 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/Messages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/Messages.java
index c508a37..dfcb1a7 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/Messages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/Messages.java
@@ -79,6 +79,8 @@ public class Messages extends NLS {
public static String TaskHistoryDropDown_Deactivate_Task;
+ public static String TaskHistoryDropDown_Open_Active_Task;
+
public static String TaskListBackupManager_Error_occured_during_scheduled_tasklist_backup;
public static String TaskListBackupManager_Scheduled_task_data_backup;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java
index 2cb11d0..ff3868d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java
@@ -45,6 +45,7 @@ import org.eclipse.ui.actions.CompoundContributionItem;
* @author Mik Kersten
* @author Leo Dos Santos
* @author Steffen Pingel
+ * @author Sam Davis
*/
public class TaskHistoryDropDown extends CompoundContributionItem {
@@ -198,11 +199,17 @@ public class TaskHistoryDropDown extends CompoundContributionItem {
items.add(separator);
}
- ITask active = TasksUi.getTaskActivityManager().getActiveTask();
+ final ITask active = TasksUi.getTaskActivityManager().getActiveTask();
if (active != null) {
Action deactivateAction = new DeactivateTaskAction();
ActionContributionItem item = new ActionContributionItem(deactivateAction);
items.add(item);
+ items.add(new ActionContributionItem(new Action(Messages.TaskHistoryDropDown_Open_Active_Task) {
+ @Override
+ public void run() {
+ TasksUiInternal.openTask(active, active.getTaskId());
+ }
+ }));
} else {
Action activateDialogAction = new ActivateDialogAction(new ActivateTaskDialogAction());
ActionContributionItem item = new ActionContributionItem(activateDialogAction);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/messages.properties
index e8e7a56..8cf5fe4 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/messages.properties
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/messages.properties
@@ -44,6 +44,7 @@ ScheduleTaskMenuContributor_Schedule_for=Schedule for
TaskActivationExternalizationParticipant_Task_Activation_History=Task Activation History
TaskHistoryDropDown_Activate_Task_=Activate Task...
TaskHistoryDropDown_Deactivate_Task=Deactivate Task
+TaskHistoryDropDown_Open_Active_Task=Open Active Task
TaskListBackupManager_Error_occured_during_scheduled_tasklist_backup=Error occured during scheduled tasklist backup.\nCheck settings on Tasklist preferences page.