Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Multiple selection dnd from non-GEF View
Multiple selection dnd from non-GEF View [message #215358] Sun, 30 April 2006 19:00
Jan van der Ven is currently offline Jan van der VenFriend
Messages: 18
Registered: July 2009
Junior Member
Dear all,



I have implemented drag and drop from a treeviewer (non-GEF) into a GEF
editor. However this only returns the first element of the selection.
That is in itself not very surprising because that is what I send over
in the DragSource:

if(TemplateTransfer.getInstance().isSupportedType(event.data Type)){
StructuredSelection ss = (StructuredSelection)
treeViewer.getSelection();
// TODO: handle multiple selection drops...
event.data = ss.getFirstElement();
}

My problem is where to implement the iterator.

The DropTarget is a GEF Editor:

public class DataEditDropTargetListener extends
TemplateTransferDropTargetListener
{
private EntityRelationEditor editor;

public DataEditDropTargetListener(EntityRelationEditor editor)
{
super(editor.getGraphicalViewer());
this.editor = editor;
}

protected CreationFactory getFactory(Object template) {
return new DataElementFactory(editor, template);
}
}

Can anyone point me in the right direction?

Kind regards,

Jan
Previous Topic:Drag and Drop issue --TransferDropTargetListener
Next Topic:Hiding a Connection
Goto Forum:
  


Current Time: Fri Apr 26 16:32:35 GMT 2024

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

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

Back to the top