Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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