Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to control drop event in TreeViewer
How to control drop event in TreeViewer [message #179522] Thu, 28 April 2005 07:50 Go to next message
zhang wei is currently offline zhang weiFriend
Messages: 84
Registered: July 2009
Member
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 15:09 Go to previous messageGo to next message
Eclipse UserFriend
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] Fri, 29 April 2005 02:56 Go to previous message
zhang wei is currently offline zhang weiFriend
Messages: 84
Registered: July 2009
Member
> 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?
Previous Topic:Connection Position Changes on Scrolling
Next Topic:Problem with GEF/EMF Workflow example under Linux
Goto Forum:
  


Current Time: Fri Apr 19 15:12:33 GMT 2024

Powered by FUDForum. Page generated in 0.01407 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top