### Eclipse Workspace Patch 1.0
#P org.eclipse.ui.navigator
Index: plugin.xml
===================================================================
RCS file: /home/eclipse/org.eclipse.ui.navigator/plugin.xml,v
retrieving revision 1.10
diff -u -r1.10 plugin.xml
--- plugin.xml 22 Feb 2006 17:11:25 -0000 1.10
+++ plugin.xml 24 Feb 2006 16:34:35 -0000
@@ -4,7 +4,6 @@
* CommonDragAdapterAssistants can extend the available TransferTypes that a * Common Navigator Viewer can generate. Clients should return the set of - * Transfer Types they support.When a match is found for a particular - * {@link DragSourceEvent}, - * {@link #setDragData(DragSourceEvent, IStructuredSelection)} will be - * called directly after. + * Transfer Types they support. When a drop event occurs, the available drag + * assistants will be searched for a enabled assistants for the + * {@link DragSourceEvent}. Only if the drop event occurs will + * {@link #setDragData(DragSourceEvent, IStructuredSelection)} be called. If + * the drop event is cancelled, + * {@link #setDragData(DragSourceEvent, IStructuredSelection)} will not be + * called. *
* * @return The added transfer types. (e.g. FileTransfer.getInstance()). @@ -76,14 +79,20 @@ * returned a matching Transfer Type from * {@link #getSupportedTransferTypes()} for the * {@link DragSourceEvent#dataType}. + *+ * Clients will only have an opportunity to set the data when the drop event + * occurs. If the drop operation is cancelled, then this method will not be + * called. + *
* * @param anEvent * The event object should have its {@link Event#data} field set * to a value that matches a supported {@link TransferData} type. * @param aSelection * The current selection from the viewer. + * @return True if the data could be set; false otherwise. */ - public abstract void setDragData(DragSourceEvent anEvent, + public abstract boolean setDragData(DragSourceEvent anEvent, IStructuredSelection aSelection); /** Index: src/org/eclipse/ui/navigator/CommonViewer.java =================================================================== RCS file: /home/eclipse/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewer.java,v retrieving revision 1.15 diff -u -r1.15 CommonViewer.java --- src/org/eclipse/ui/navigator/CommonViewer.java 23 Feb 2006 18:21:45 -0000 1.15 +++ src/org/eclipse/ui/navigator/CommonViewer.java 24 Feb 2006 16:34:42 -0000 @@ -94,7 +94,7 @@ CommonDragAdapter dragAdapter = new CommonDragAdapter(contentService, this); - addDragSupport(operations, dragAdapter.getSupportDragTransfers(), + addDragSupport(operations, dragAdapter.getSupportedDragTransfers(), dragAdapter); CommonDropAdapter dropAdapter = new CommonDropAdapter(contentService, Index: src/org/eclipse/ui/internal/navigator/extensions/SkeletonCommonDragAssistant.java =================================================================== RCS file: /home/eclipse/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SkeletonCommonDragAssistant.java,v retrieving revision 1.1 diff -u -r1.1 SkeletonCommonDragAssistant.java --- src/org/eclipse/ui/internal/navigator/extensions/SkeletonCommonDragAssistant.java 9 Feb 2006 21:32:09 -0000 1.1 +++ src/org/eclipse/ui/internal/navigator/extensions/SkeletonCommonDragAssistant.java 24 Feb 2006 16:34:41 -0000 @@ -50,8 +50,9 @@ * @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#setDragData(org.eclipse.swt.dnd.DragSourceEvent, * org.eclipse.jface.viewers.IStructuredSelection) */ - public void setDragData(DragSourceEvent anEvent, + public boolean setDragData(DragSourceEvent anEvent, IStructuredSelection aSelection) { + return false; } Index: schema/navigatorContent.exsd =================================================================== RCS file: /home/eclipse/org.eclipse.ui.navigator/schema/navigatorContent.exsd,v retrieving revision 1.23 diff -u -r1.23 navigatorContent.exsd --- schema/navigatorContent.exsd 22 Feb 2006 17:11:25 -0000 1.23 +++ schema/navigatorContent.exsd 24 Feb 2006 16:34:38 -0000 @@ -86,7 +86,7 @@