Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-03-14 00:07:48 +0000
committerrelves2007-03-14 00:07:48 +0000
commit045d25327f84fe213a65b7ab15d86ff5b8aea155 (patch)
tree1aa647e2f3759def963b4ce0f882bec76e1d0403
parent7f284257444628a42040a5dcf773a59343257753 (diff)
downloadorg.eclipse.mylyn.tasks-045d25327f84fe213a65b7ab15d86ff5b8aea155.tar.gz
org.eclipse.mylyn.tasks-045d25327f84fe213a65b7ab15d86ff5b8aea155.tar.xz
org.eclipse.mylyn.tasks-045d25327f84fe213a65b7ab15d86ff5b8aea155.zip
NEW - bug 177240: Allow to open multiple tasks at once
https://bugs.eclipse.org/bugs/show_bug.cgi?id=177240
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java
index a3d6a4af8..5976d4c9d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java
@@ -19,6 +19,9 @@ import org.eclipse.mylar.tasks.core.AbstractTaskContainer;
import org.eclipse.mylar.tasks.core.ITaskListElement;
import org.eclipse.mylar.tasks.ui.TasksUiUtil;
+import java.util.Iterator;
+import java.util.List;
+
/**
* @author Mik Kersten
*/
@@ -38,9 +41,12 @@ public class OpenTaskListElementAction extends Action {
@Override
public void run() {
ISelection selection = viewer.getSelection();
- Object element = ((IStructuredSelection) selection).getFirstElement();
- if (element instanceof ITaskListElement && !(element instanceof AbstractTaskContainer)) {
- TasksUiUtil.refreshAndOpenTaskListElement((ITaskListElement)element);
+ List<?> list = ((IStructuredSelection) selection).toList();
+ for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
+ Object element = (Object) iterator.next();
+ if (element instanceof ITaskListElement && !(element instanceof AbstractTaskContainer)) {
+ TasksUiUtil.refreshAndOpenTaskListElement((ITaskListElement) element);
+ }
}
}
}

Back to the top