Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Cannot get DND to call dragSetData or drop(How do I get a drop in a drag-and-drop sequence enabled?)
Cannot get DND to call dragSetData or drop [message #1842746] Wed, 30 June 2021 12:05 Go to next message
Steve Vestal is currently offline Steve VestalFriend
Messages: 30
Registered: March 2013
Member
I am following the examples I can find online to do drag-and-drop copy from one tree element to a different place in the same tree view. I set event.doit=true in DragSourceListener#dragStart, which is being called. Calls are being made to my DropTargetListener for enter, over, and leave. When I do the drag-drop gesture in the GUI, it will show a little slashed circle (disallowed sort of icon) as I move the cursor and its selection. How do I get calls made to DragSourceListener#dragSetData and DropTargetListener#drop? What are other conditions that need to be satisfied beyond event.doit=true to make that happen?
Re: Cannot get DND to call dragSetData or drop [message #1842763 is a reply to message #1842746] Wed, 30 June 2021 17:29 Go to previous messageGo to next message
Steve Vestal is currently offline Steve VestalFriend
Messages: 30
Registered: March 2013
Member
Making progress. Using one of the many OTS DropTargetAdapters solves the problem, in fact too much. The next step is to only have it call drop when the gesture to end a drop occurs (e.g., releasing the mouse button) rather than calling drop every time the cursor moves past something.
Re: Cannot get DND to call dragSetData or drop [message #1842764 is a reply to message #1842763] Wed, 30 June 2021 18:06 Go to previous messageGo to next message
Steve Vestal is currently offline Steve VestalFriend
Messages: 30
Registered: March 2013
Member
My mistake. It was calling validateDrop. ViewerDropAdapter won't call drop or performDrop either.
Re: Cannot get DND to call dragSetData or drop [message #1842769 is a reply to message #1842764] Wed, 30 June 2021 20:02 Go to previous message
Steve Vestal is currently offline Steve VestalFriend
Messages: 30
Registered: March 2013
Member
Progress. DND.DROP_COPY (=1) has no effect. The only operation that seems to be recognized is DND.DROP_MOVE (=2). Only DROP_MOVE will give a non-zero (not DND.DROP_NONE) value for the operation parameter of validateDrop. All the other DND.DROP_* values seem to get masked off and behave like DND.DROP_NONE, and a non-null operation seems to be required in addition to a true return from validateDrop. Can anyone confirm this?
Previous Topic:Disable Dark theme on macOS for eclipse products
Next Topic:Issue with libs of org.eclipse.jface. in Linux Platform
Goto Forum:
  


Current Time: Wed Oct 27 11:31:10 GMT 2021

Powered by FUDForum. Page generated in 0.01694 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top