[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.emf] Re: Drag & Drop not working for own TableTreeViewer

Florian,

Excellent, so you have a workaround for now then.   I was trying with a 3.0
version of Eclipse, perhaps that's why it didn't work for me anymore...

Florian Georg wrote:

> Ed,
>
> your workaround posted for 38840 works for me almost perfect. Only the
> "insertion dash" doesn't show up.
> Maybe this will be fixed in 36822...
>
> thanks
>    Florian
>
> Ed Merks wrote:
>
> > Florian,
> >
> > 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=38840
> >
> > which was returned as a duplicate of this one
> >
> >     https://bugs.eclipse.org/bugs/show_bug.cgi?id=36822
> >
> > which 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
> >>