Information about DragSource in validateDrop for PluginTransfer [message #328228] |
Mon, 19 May 2008 10:51  |
Eclipse User |
|
|
|
Originally posted by: eclipse.shedid.de
Hello,
the summary of the problem is that we're looking for a way to set the
result of the validateDrop() method depending on where the
PluginTransfer comes from.
Our use case is as follows:
We have two views in independent plugins (no dependencies on each other)
and want to provide Drag&Drop between these two. Since we have no common
code (except what Eclipse provides) it seems reasonable to choose
PluginTransfer as transfer type.
No comes the tricky part:
Since the PluginTransfer can basically come from any other plugin, we'd
like to 'recognize' what is about to be dropped on us within
validateDrop() to decide if we allow a drop here. Setting a String (as
some kind of ID) would be OK, since I know both plugins, but I cannot
add a dependency between them. We would like to allow drops only from a
specific plugin and only if this other plugin sets some specific
information about the drag source.
But since dragSetData() is always called after validateDrop succseeds,
we can not use it this way.
Is there any other way of adding information that can be used during
validateDrop() without having to define a dependency between the two
plugins?
Thanks and Kind regards,
Dirk
|
|
|
Re: Information about DragSource in validateDrop for PluginTransfer [message #544334 is a reply to message #328228] |
Fri, 02 July 2010 08:07  |
Eclipse User |
|
|
|
I am facing a similar Problem with DnD operations within a CommonNavigator. Actually i am not able to get the drag source within the validateDrop method while still draging. As soon as you actually drop the element, you will be able to access the source. I am also unhappy about this, and would highly appreciate any way of determining my drag source while still dragging it.
Cheers
Phil
|
|
|
Powered by
FUDForum. Page generated in 0.03343 seconds