|Information about DragSource in validateDrop for PluginTransfer [message #328228]
||Mon, 19 May 2008 14:51
Originally posted by: eclipse.shedid.de|
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
Thanks and Kind regards,
Powered by FUDForum
. Page generated in 0.12283 seconds