Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2011-06-13 03:18:12 -0400
committerfbecker2011-06-13 03:18:12 -0400
commit6ce91594bcc009dbd537d224e7860c06439c81fb (patch)
tree33a09cc955d149556e58e1d9db01976ff8791065
parent8daf693784e24c451db5d9f99a14c409f433f0ce (diff)
downloadorg.eclipse.mylyn.tasks-6ce91594bcc009dbd537d224e7860c06439c81fb.tar.gz
org.eclipse.mylyn.tasks-6ce91594bcc009dbd537d224e7860c06439c81fb.tar.xz
org.eclipse.mylyn.tasks-6ce91594bcc009dbd537d224e7860c06439c81fb.zip
ASSIGNED - bug 349003: [patch] support opening multiple tasks at once
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349003
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java17
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialogWithRandom.java2
3 files changed, 12 insertions, 11 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java
index 7d7a34922..eab2629b6 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java
@@ -34,7 +34,7 @@ public class OpenTaskAction extends ActionDelegate implements IWorkbenchWindowAc
@Override
public void run(IAction action) {
- TaskSelectionDialog dlg = new TaskSelectionDialog(window.getShell());
+ TaskSelectionDialog dlg = new TaskSelectionDialog(window.getShell(), true);
dlg.setTitle(Messages.OpenTaskAction_Open_Task);
dlg.setMessage(Messages.OpenTaskAction_Select_a_task_to_open__);
dlg.setShowExtendedOpeningOptions(true);
@@ -43,13 +43,14 @@ public class OpenTaskAction extends ActionDelegate implements IWorkbenchWindowAc
return;
}
- Object result = dlg.getFirstResult();
- if (result instanceof ITask) {
- AbstractTask task = (AbstractTask) result;
- if (dlg.getOpenInBrowser()) {
- TasksUiUtil.openWithBrowser(task);
- } else {
- TasksUiInternal.refreshAndOpenTaskListElement(task);
+ for (Object result : dlg.getResult()) {
+ if (result instanceof ITask) {
+ AbstractTask task = (AbstractTask) result;
+ if (dlg.getOpenInBrowser()) {
+ TasksUiUtil.openWithBrowser(task);
+ } else {
+ TasksUiInternal.refreshAndOpenTaskListElement(task);
+ }
}
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
index a59ace76e..5f9396900 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
@@ -428,8 +428,8 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog {
private final TaskActivationHistory taskActivationHistory;
- public TaskSelectionDialog(Shell parent) {
- super(parent);
+ public TaskSelectionDialog(Shell parent, boolean multi) {
+ super(parent, multi);
this.taskActivationHistory = TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory();
this.history = new LinkedHashSet<AbstractTask>(taskActivationHistory.getPreviousTasks());
this.itemsComparator = new TaskHistoryItemsComparator(new ArrayList<AbstractTask>(history));
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialogWithRandom.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialogWithRandom.java
index 6041ba5de..3c8262645 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialogWithRandom.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialogWithRandom.java
@@ -43,7 +43,7 @@ public class TaskSelectionDialogWithRandom extends TaskSelectionDialog {
private boolean activateTask = false;
public TaskSelectionDialogWithRandom(Shell parent) {
- super(parent);
+ super(parent, false);
}
@Override

Back to the top