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/views/TaskListDropAdapter.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java
index 186c3e401..c38e9c757 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java
@@ -81,6 +81,8 @@ public class TaskListDropAdapter extends ViewerDropAdapter {
ITask targetTask = null;
if (getCurrentTarget() instanceof ITask) {
targetTask = (ITask)getCurrentTarget();
+ } else if (getCurrentTarget() instanceof AbstractQueryHit) {
+ targetTask = ((AbstractQueryHit) getCurrentTarget()).getCorrespondingTask();
}
if (targetTask != null) {
final String[] names = (String[]) data;
@@ -204,8 +206,12 @@ public class TaskListDropAdapter extends ViewerDropAdapter {
currentTransfer = transferType;
Object selectedObject = ((IStructuredSelection) ((TreeViewer) getViewer()).getSelection()).getFirstElement();
- if (FileTransfer.getInstance().isSupportedType(currentTransfer) && getCurrentTarget() instanceof ITask) {
- return true;
+ if (FileTransfer.getInstance().isSupportedType(currentTransfer)) {
+ if(getCurrentTarget() instanceof ITask) {
+ return true;
+ } else if (getCurrentTarget() instanceof AbstractQueryHit) {
+ return ((AbstractQueryHit) getCurrentTarget()).getCorrespondingTask() != null;
+ }
} else if (!(selectedObject instanceof AbstractRepositoryQuery)) {
if (getCurrentTarget() instanceof TaskCategory) {
return true;

Back to the top