Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Drag and Drop in CommonNavigator
Drag and Drop in CommonNavigator [message #467472] Fri, 04 May 2007 07:45 Go to next message
Eclipse UserFriend
I'm implementing Drag and Drop in CommonNavigator. So far I have
created a transfer data type, a Drag/DropAdapterAssistant and
configured everything in plugin.xml. I have a navigator view
with a working DragAdapterAssistant returning the array of
transfer types. But my DropAdapterAssistant isn't working. I expect
validateDrop() to be called when dragging the cursor over an
eligible targent node or at least when releasing the mouse button.
But nothing happens although the target node is in possibleChildren
and in possibleDropTargets. Any hints what's wrong and what to check?

Thanks in advance for your help.

--
Gruesse/Regards,

Peter Maas, Aachen
E-mail "cC5tYWFzQG1hZ21hc29mdC5kZQ==\n".decode("base64")
Re: Drag and Drop in CommonNavigator [message #467479 is a reply to message #467472] Fri, 04 May 2007 09:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gsmithfarmer.gmail.com

I am trying the same (in an RCP application).

Did you supply both possibleChildren (to the contentProvider)
and possibleDropTargets to the dropAssistant? My drop assistant is being invoked...my problem is that I do not understand the transferData.

usine 3.2.2
Re: Drag and Drop in CommonNavigator [message #467491 is a reply to message #467479] Fri, 04 May 2007 10:01 Go to previous message
Eclipse UserFriend
Gregory Smith schrieb:
> I am trying the same (in an RCP application).
> Did you supply both possibleChildren (to the contentProvider)
> and possibleDropTargets to the dropAssistant?

I supplied the target node type to navigatorContent/possibleChildren/instanceof
*and* to navigatorContent/dropAssistant/possibleDropTargets/instanceo f (both in
org.eclipse.ui.navigator.navigatorContent).

> My drop assistant is being invoked...

Then please tell me what you did that I forgot :)

> my problem is that I do not understand the transferData.

There is a good article in the Eclipse articles collection:

http://www.eclipse.org/articles/Article-Workbench-DND/drag_d rop.html

You have to serialize the transferred selection on the drag side
(i.e. convert its objects to a byte array) and deserialize it on the
drop side (rebuild the selection objects from the byte array). This
is done in toByteArray() and fromByteArray().

Check out the running example at

http://www.eclipse.org/articles/Article-Workbench-DND/gadget src.zip

--
Gruesse/Regards,

Peter Maas, Aachen
E-mail "cC5tYWFzQG1hZ21hc29mdC5kZQ==\n".decode("base64")
Previous Topic:Field Decorators in Fomrs
Next Topic:Build Update Site
Goto Forum:
  


Current Time: Mon Jul 07 16:25:47 EDT 2025

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

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

Back to the top