Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 247294 - [CommonNavigator] Project Explorer: ResourceDragAdapterAssistant always initiates drag of resources
Summary: [CommonNavigator] Project Explorer: ResourceDragAdapterAssistant always initi...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Francis Upton IV CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 194208
  Show dependency tree
 
Reported: 2008-09-15 10:03 EDT by Anton Leherbauer CLA
Modified: 2009-06-01 09:53 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (4.17 KB, patch)
2008-09-16 06:19 EDT, Anton Leherbauer CLA
john.arthorne: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Leherbauer CLA 2008-09-15 10:03:53 EDT
The ResourceDragAdapterAssistant always initiates dragging of resources if a ResourceTransfer is a supported type of the drop target, even if no resource is selected. The drag data is set to an empty array of IResource.

This is a problem when trying to support dragging a non-resource from the PE to the editor area, because the EditorAreaDropAdapter does accept ResourceTransfer.
Adding another dragAssistant does not work, because drag assistants are not called in a particular order.

See also CDT bug 194208.
Comment 1 Anton Leherbauer CLA 2008-09-16 06:19:32 EDT
Created attachment 112650 [details]
Proposed fix

This patch changes the behavior for the ResourceTransfer and FileTransfer cases to return false if the selection cannot be adapted to a resource.
That way other drag assistants get a chance to handle this event.
Comment 2 Francis Upton IV CLA 2009-01-15 03:04:33 EST
Released slightly modified patch to HEAD 3.5M5
Comment 3 Anton Leherbauer CLA 2009-01-15 04:00:24 EST
Thanks, Francis! 
Would you mind considering also bug 194209? This bug can have a huge performance impact with large workspaces.
Comment 4 John Arthorne CLA 2009-06-01 09:53:03 EDT
Removing iplog+ from bug - this indicates an IP contribution in a comment
rather than a patch.

http://wiki.eclipse.org/Development_Resources/Automatic_IP_Log