Community
Participate
Working Groups
The Package Explorer accepts SelectionTransfers and PluginTransfers. However it seems that SelectionTransfers cannot be implemented in an external application to work correctly with the Package Explorer. Unfortunately SelectionTransfer seems to have precedence (at least as soon as the drop target becomes an IResource). If now a drag source supports both [SelectionTransfer, PluginTransfer] it is impossible to add support for the Package Explorer. Interestingly my demo source implements org.eclipse.jface.util.LocalSelectionTransfer while in SelectionTransferDropAdapter#182 org.eclipse.ui.views.navigator.LocalSelectionTransfer is referenced. However I can only make DnD work by removing the LocalSelectionTransfer type in my drag source.
Your bug report contains two "seems" ;-). Please provide either a test case or steps based on Eclipse SDK 4.7 M6 that allow us to reproduce the problem. Thanks.
Steps to reproduce: 1) Provide an implementation for org.eclipse.ui.dropActions 2) Provide a dragsource that only supports PluginTransfer 3) verify that YourDropActionDelegate.run() gets called on a drop action 4) now let your dragsource also support org.eclipse.jface.util.LocalSelectionTransfer see that DnD to project explorer no longer works: YourDropActionDelegate.run() does not get called when dropping to an IResource
(In reply to Christian Pontesegger from comment #2) > see that DnD to project explorer no longer works: ...DnD to Package Explorer... of course
(In reply to Christian Pontesegger from comment #2) > Steps to reproduce: > > 1) Provide an implementation for org.eclipse.ui.dropActions > 2) Provide a dragsource that only supports PluginTransfer > 3) verify that YourDropActionDelegate.run() gets called on a drop action > > 4) now let your dragsource also support > org.eclipse.jface.util.LocalSelectionTransfer > > see that DnD to project explorer no longer works: > YourDropActionDelegate.run() does not get called when dropping to an > IResource We won't spend time to build that test case. If you will have to attach a test case or example.
Created attachment 267936 [details] Sample project Sample project added. The project contains a view 'Bug 515028' with a text box. Selections from there can be dropped to the Navigator. The DropActionDelegate will open a popup when it gets called. Uncommenting line ViewPart.java#35 will show the invalid behavior.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.