| [news.eclipse.tools.emf] Re: Drag & Drop not working for own TableTreeViewer |
I don't think this works in the generated editor either. Does it work for you in the generated editor?
I opened this bugzilla defect:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=38840which was returned as a duplicate of this one
https://bugs.eclipse.org/bugs/show_bug.cgi?id=36822which isn't fixed yet. And I don't think that the workaround in 38840 works anymore either. :-(
As you can see from the dates, this problem has been around for some
time. You may wish to add you own request for resolution to 36822...
Florian Georg wrote:
Hello,I use the following code to enable DnD support for my own viewer :
//----------------------
TableTreeViewer viewer;
viewer = new ExtendedTableTreeViewer(container,
SWT.FULL_SELECTION | SWT.FLAT);// ... [snip] ....
// activate Drag and Drop
int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
Transfer[] transfers = new Transfer[]
{
LocalTransfer.getInstance(),
TextTransfer.getInstance()
};
viewer.addDragSupport(dndOperations, transfers,
new ViewerDragAdapter(viewer));viewer.addDropSupport(dndOperations, transfers,
new EditingDomainViewerDropAdapter(myEditingDomain, viewer));
//----------------------As you can see, I use almost identical code like in the generated EMF
Editor. But although it works fine in the Outline and all other
generated views, it does NOT for my own viewer.Neither can I start dragging an item, nor can an item be dropped into
the viewer.Any ideas ?
thanks in advance
Florian