Community
Participate
Working Groups
RC2 Linux-GTK Drag and drop doesn't work. I've tried it in the DNDExample and in the package explorer and drags are never initiated.
In the DNDExample, you have to check off "DragDetect hooked" and "DropTarget registered". I will fix the example to make it more clear. This worked for me on RedHat 8.0 in Gnome. What are you using?
Ok. If I check those two options, the example works. However, DND in the package explorer has still gone missing. Should I reassign to JDT UI?
I think it is a result of: http://dev.eclipse.org/bugs/show_bug.cgi?id=30543
The fix for bug 30543 should not prevent DND within the package explorer. This does not work for me either. There is no drag feedback. Works fine in the Navigator.
Moving to JDT UI since the problem seems to be with the Package Explorer.
PackageExplorer is missing the call to DragSource.setTransfer. This is OK under Windows but not under Linux-GTK.
Same happens under Linux-Motif
*** Bug 34640 has been marked as a duplicate of this bug. ***
There is another bug that prevents DnD from working as soon as a member was draged. The package explorer contains code that resets the transfer types to selection transfer only as soon as the user drags a method. for (Iterator iter= selection.iterator(); iter.hasNext(); ) { if (iter.next() instanceof IMember) { setPossibleListeners(new TransferDragSourceListener[] {new SelectionTransferDragAdapter(fViewer)}); break; } } The problem is that DnD is only initialized on creation time of the package explorer hence dragging a method disables DnD for resouce and file transfer as long as the package explorer exists. Adam, can you please comment on this code since I believe it went in when we enabled DnD for members.
Dirk, this code was introduced by you as a part of fix for bug 12585 (i found it by looking at the resource history of the file - see revision 1.108)
Thanks !
btw, same code sits in JavaBrowsingPart too
Already detected it. There are some inconsistencies regarding DnD. I opened a separate PR for it (see bug 34934)
Created attachment 4107 [details] Patch that fixes the problem
Fixed for RC3. Reviewed by Adam Kiezun.
Does anyone recall that GEF copied the implementation of DelegatingDragSource? Oh well, we just finished re-living the same problems. Knut, maybe platform-ui should reconsider adopting these classes for 2.2.
*** Bug 35023 has been marked as a duplicate of this bug. ***
Bug 10146 is still open. I definitely want to look into taking these for 2.2. The current NavigatorDropAdapter seems less than ideal. I just need to look into what it takes to switch it to a delegating adapter.
*** Bug 35031 has been marked as a duplicate of this bug. ***
Verified for RC3 by Andre Weinand