Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2006-12-19 00:16:21 -0500
committermkersten2006-12-19 00:16:21 -0500
commit58523651652aaece264f1dc88600329b3c1ba42d (patch)
tree23704738f0710fd24eab34549e439b266a05e509
parent99fc8d832857b7c338fb5d1769f572696720b053 (diff)
downloadorg.eclipse.mylyn.tasks-58523651652aaece264f1dc88600329b3c1ba42d.tar.gz
org.eclipse.mylyn.tasks-58523651652aaece264f1dc88600329b3c1ba42d.tar.xz
org.eclipse.mylyn.tasks-58523651652aaece264f1dc88600329b3c1ba42d.zip
RESOLVED - bug 167043: Task List drop adapter does not accept dropping context files into query hitsR_1_0_1
https://bugs.eclipse.org/bugs/show_bug.cgi?id=167043
-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