How to control drop event in TreeViewer [message #179522] |
Thu, 28 April 2005 03:50  |
Eclipse User |
|
|
|
Hi all,
When I implements GEF TreeViewer's dnd, I got some problems.
I have two kinds node in the treeviewer, one(A) can has child,
another(B) can't has child.
I don't know how to control the drop event,
to make sure (B)kind node can't add child.
I found in logic example's OutLine view(has a treeviewer) does it very
well,
I can add a LED node into FlowContainer node,
but can't add a LED node into another LED node.
I don't know what code in logic example implemented this.
Could you give me some hints?
Thanks
|
|
|
Re: How to control drop event in TreeViewer [message #179556 is a reply to message #179522] |
Thu, 28 April 2005 11:09   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
The commands/targeting system prevents this from happening. Either there is
no target editpart, or there is a target, and it returns a command which is
not executable.
As of the more recent 3.1 builds, DND internal to the treeviewer will query
for commands from the targets and show a NOT sign when the command is not
executable. In 3.0, DND cursor was always shown even if you could not move
the item.
"wei zhang" <zhang-wei@sinocom.cn> wrote in message
news:ac5e1fe00c83de4f91e99bb4281e3222$1@www.eclipse.org...
> Hi all,
>
> When I implements GEF TreeViewer's dnd, I got some problems.
>
> I have two kinds node in the treeviewer, one(A) can has child,
> another(B) can't has child.
> I don't know how to control the drop event, to make sure (B)kind node
> can't add child.
>
> I found in logic example's OutLine view(has a treeviewer) does it very
> well, I can add a LED node into FlowContainer node,
> but can't add a LED node into another LED node.
>
> I don't know what code in logic example implemented this.
> Could you give me some hints?
>
> Thanks
>
|
|
|
Re: How to control drop event in TreeViewer [message #179628 is a reply to message #179556] |
Thu, 28 April 2005 22:56  |
Eclipse User |
|
|
|
> As of the more recent 3.1 builds, DND internal to the treeviewer will query
> for commands from the targets and show a NOT sign when the command is not
> executable. In 3.0, DND cursor was always shown even if you could not move
> the item.
Oh, when GEF3.1 will be released?
|
|
|
Powered by
FUDForum. Page generated in 0.05201 seconds