Problem with dnd [message #181739] |
Thu, 19 May 2005 10:50  |
Eclipse User |
|
|
|
Originally posted by: paolino125.hotmail.com
Hi, I have a treeviewer with objects of some types, and some different
graphicalViewer. Some object can dnd to some graphicalViewer and some not.
During dnd I serialize my object. How can I make the rootEditPart deny dnd
if current object isn't allowed? I read on articles that rootEditPart must
understand the request to allow dnd, but I don't understand how make this...
Thanks
|
|
|
Re: Problem with dnd [message #182093 is a reply to message #181739] |
Sun, 22 May 2005 14:44  |
Eclipse User |
|
|
|
Dragging between viewers is native drag and drop, not GEF dnd. So, requests
don't come into the picture unless you create and target them yourselves
(which you should). You should look at the dnd articles on eclipse.org. If
I remember correctly, during native DND, you don't know what's being dropped
until the drop actually happens. But you could get around this by storing
the dragged object in some field (the dragsource would set it when the drag
starts, and the drop listener would access it while the drag is happening).
Look at the EDiagram example (editor package): it does the same thing.
"Paolino Paperino" <paolino125@hotmail.com> wrote in message
news:d6i95a$26l$1@news.eclipse.org...
> Hi, I have a treeviewer with objects of some types, and some different
> graphicalViewer. Some object can dnd to some graphicalViewer and some not.
> During dnd I serialize my object. How can I make the rootEditPart deny dnd
> if current object isn't allowed? I read on articles that rootEditPart must
> understand the request to allow dnd, but I don't understand how make
this...
>
> Thanks
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05182 seconds