Detecting underlying EditPart during DND [message #116146] |
Sun, 08 February 2004 02:38  |
Eclipse User |
|
|
|
Originally posted by: selai.yahoo.com
Hi,
I've implemented an explorer which the user can dnd to the "canvas".
However, i also want to be able to drag my object from the explorer to a
"container" figure like the "Circuit" in the GEF example. I tried finding
a way to detect the underlying model that i'm trying to drag to by using
GraphicalViewer()'s getSelection() or getSelectedEditParts but they only
return me models that are currently selected in the canvas. that would
means that if my "container" is not selected, dragging my object from the
explorer will not be pasted into the "container"... Is there any other
ways?? Any help is appreciated. Thanks in advance!!
|
|
|
Re: Detecting underlying EditPart during DND [message #116184 is a reply to message #116146] |
Sun, 08 February 2004 23:00  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
I suggest that you look at the way targeting in general is done with GEF,
for example the DragEditPartsTracker (non-DND). We provide an abstract
TransferDropTargetListener which works with a request, and uses that request
to determine the proper target editpart, and also to then obtain a Command
from that editpart.
"June" <selai@yahoo.com> wrote in message news:c04p10$roa$1@eclipse.org...
> Hi,
> I've implemented an explorer which the user can dnd to the "canvas".
> However, i also want to be able to drag my object from the explorer to a
> "container" figure like the "Circuit" in the GEF example. I tried finding
> a way to detect the underlying model that i'm trying to drag to by using
> GraphicalViewer()'s getSelection() or getSelectedEditParts but they only
> return me models that are currently selected in the canvas. that would
> means that if my "container" is not selected, dragging my object from the
> explorer will not be pasted into the "container"... Is there any other
> ways?? Any help is appreciated. Thanks in advance!!
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04925 seconds