Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2011-06-13 03:24:20 -0400
committerfbecker2011-06-13 03:24:20 -0400
commit7b5e3141365a0d035971e2170da86755b61ce20a (patch)
tree4255ba67594731c3a9fc51f193f450635e0f211b
parent6ce91594bcc009dbd537d224e7860c06439c81fb (diff)
downloadorg.eclipse.mylyn.tasks-7b5e3141365a0d035971e2170da86755b61ce20a.tar.gz
org.eclipse.mylyn.tasks-7b5e3141365a0d035971e2170da86755b61ce20a.tar.xz
org.eclipse.mylyn.tasks-7b5e3141365a0d035971e2170da86755b61ce20a.zip
ASSIGNED - bug 349003: [patch] support opening multiple tasks at once
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349003 reverted because I can not commit to org.eclipse.mylyn.context
-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, 11 insertions, 12 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 eab2629b6..7d7a34922 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(), true);
+ TaskSelectionDialog dlg = new TaskSelectionDialog(window.getShell());
dlg.setTitle(Messages.OpenTaskAction_Open_Task);
dlg.setMessage(Messages.OpenTaskAction_Select_a_task_to_open__);
dlg.setShowExtendedOpeningOptions(true);
@@ -43,14 +43,13 @@ public class OpenTaskAction extends ActionDelegate implements IWorkbenchWindowAc
return;
}
- for (Object result : dlg.getResult()) {
- if (result instanceof ITask) {
- AbstractTask task = (AbstractTask) result;
- if (dlg.getOpenInBrowser()) {
- TasksUiUtil.openWithBrowser(task);
- } else {
- TasksUiInternal.refreshAndOpenTaskListElement(task);
- }
+ Object result = dlg.getFirstResult();
+ 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 5f9396900..a59ace76e 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, boolean multi) {
- super(parent, multi);
+ public TaskSelectionDialog(Shell parent) {
+ super(parent);
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 3c8262645..6041ba5de 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, false);
+ super(parent);
}
@Override

Back to the top