Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-10-26 14:15:55 -0400
committermkersten2005-10-26 14:15:55 -0400
commitd11a087c01caaa42e3f6d90977fdd68b34fcd0b5 (patch)
treeb35441797340af33724c8bf233f6be897861d7bf
parentbc950e599dbdb63ac0d06e13a94f5816cb46a23b (diff)
downloadorg.eclipse.mylyn.tasks-d11a087c01caaa42e3f6d90977fdd68b34fcd0b5.tar.gz
org.eclipse.mylyn.tasks-d11a087c01caaa42e3f6d90977fdd68b34fcd0b5.tar.xz
org.eclipse.mylyn.tasks-d11a087c01caaa42e3f6d90977fdd68b34fcd0b5.zip
minor
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java
index f3a8bc4d5..1ccd2157a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java
@@ -1275,14 +1275,16 @@ public class TaskListView extends ViewPart {
updateDrillDownActions();
}
-
public ITask getSelectedTask() {
ISelection selection = getViewer().getSelection();
if (selection.isEmpty()) return null;
if (selection instanceof StructuredSelection) {
StructuredSelection structuredSelection = (StructuredSelection)selection;
- if (structuredSelection.getFirstElement() instanceof ITask) {
+ Object element = structuredSelection.getFirstElement();
+ if (element instanceof ITask) {
return (ITask)structuredSelection.getFirstElement();
+ } else if (element instanceof IQueryHit) {
+ return ((IQueryHit)element).getOrCreateCorrespondingTask();
}
}
return null;

Back to the top