Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Information about DragSource in validateDrop for PluginTransfer
Information about DragSource in validateDrop for PluginTransfer [message #328228] Mon, 19 May 2008 14:51 Go to next message
Eclipse UserFriend
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 12:07 Go to previous message
Phil F. is currently offline Phil F.Friend
Messages: 7
Registered: July 2010
Junior Member
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
Previous Topic:CommonDropAdapterAssistant validateDrop cannot get drag source
Next Topic:Import/Export Repository Locations
Goto Forum:
  


Current Time: Thu Apr 25 05:40:43 GMT 2024

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

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

Back to the top