summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-11-09 14:50:35 (EST)
committerEike Stepper2007-11-09 14:50:35 (EST)
commitc1e3acb4f5f8b07bbc170567732c7940ba3b5c65 (patch)
tree23b8b30217808e1d3fc1bc5b591702f5aa7110c5
parent0c94aa3b7a54ff5f1037f6bcd96603b0ef6ab9b6 (diff)
downloadcdo-c1e3acb4f5f8b07bbc170567732c7940ba3b5c65.zip
cdo-c1e3acb4f5f8b07bbc170567732c7940ba3b5c65.tar.gz
cdo-c1e3acb4f5f8b07bbc170567732c7940ba3b5c65.tar.bz2
[209346] Provide Fileshare example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=209346
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesDragListener.java5
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDDragListener.java3
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesDragListener.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesDragListener.java
index e495e2d..1c64745 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesDragListener.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesDragListener.java
@@ -45,6 +45,11 @@ public class BuddiesDragListener extends DNDDragListener<IBuddy[]>
}
}
+ if (buddies.isEmpty())
+ {
+ return null;
+ }
+
return buddies.toArray(new IBuddy[buddies.size()]);
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDDragListener.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDDragListener.java
index 1586f73..6096445 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDDragListener.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDDragListener.java
@@ -54,7 +54,8 @@ public abstract class DNDDragListener<TYPE> extends DragSourceAdapter
@Override
public void dragStart(DragSourceEvent event)
{
- event.doit = !viewer.getSelection().isEmpty();
+ IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
+ event.doit = !viewer.getSelection().isEmpty() && getObject(selection) != null;
}
protected abstract TYPE getObject(IStructuredSelection selection);