Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse Drag and Drop - ViewPart to CommonNavigator
icon5.gif  Eclipse Drag and Drop - ViewPart to CommonNavigator [message #1051988] Mon, 29 April 2013 13:30
Michael Genau is currently offline Michael GenauFriend
Messages: 9
Registered: April 2013
Junior Member
Hello forum,

i tried to implement drag and drop but i am struggling with the drop functionality of my extended CommonNavigator.

I read some examples about darg and drop between two views of one plugin, both derived from ViewPart and I tested a dropAction implementing IDropActionDelegate to communicate between different plugins.

Both examples are working but I have one view derived from ViewPart like:
Transfer[] transfers = new Transfer[] { RequirementTransfer.getInstance()/*, PluginTransfer.getInstance()*/ };
viewer.addDragSupport( ops, transfers, new RequirementDragListener( viewer ) );

and another view defined in plugin.xml like here:
I tried to specify an drop assistant because there occurs an exception that the drop target can not be initialized, if I use the common view of the common navigator like in the first view to add drop support.

The problem is that my drop assistant is not used by the related view.
Is there any way to set a ViewerDropAdapter to view derived from CommonNavigator?
The class CommonDropAdapter is final. So it is useless to overwrite the method of CommonView which creates the CommonDropAdapter.
What is the correct way to implement drag and drop in my scenario?
Is there any example available?

Note: The common navigator should enable dropping only for objects of a special class (I created a class which extends ByteArrayTransfer).

Thanks for your help!

[Updated on: Tue, 30 April 2013 04:16]

Report message to a moderator

Previous Topic:FilteredTree: ClassCastException: FilteredTree cannot be cast to org.eclipse.swt.widgets.Tree
Next Topic:Generic Debug Framework
Goto Forum:

Current Time: Fri May 25 01:35:19 GMT 2018

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

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

Back to the top