Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Combined Create/Connect Tool
Combined Create/Connect Tool [message #191662] Wed, 10 August 2005 18:28 Go to next message
Eclipse UserFriend
Originally posted by: mbernst.stanford.edu

Is there any documentation on how to create custom tools? I'm working
on a tool which works like your generic ConnectionCreationTool, but
instead of failing if the targetEditPart is null (i.e. the second click
was on the root instead of a proper edit part), will instead create a
new target edit part and immediately link to that.

I'm having trouble because we can only be passing one kind of request
around and though we can chain commands together it's a bit unclear to
me how the entire process should actually work. Right now my approach
is to extend ConnectionCreationTool, but I seem to be stumbling randomly
around the code without really knowing with methods to override.

Any direction would be greatly appreciated! Thank you all very much for
your tireless support of this newsgroup.
- Michael
Re: Combined Create/Connect Tool [message #191669 is a reply to message #191662] Wed, 10 August 2005 18:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Instead of not having a target (null), why not make the diagram editpart the
target of the second click (REQ_CONNECTION_END).

The second node is free to return the original sources command, or it can
just return some new command which does a bit more based on the source
command.

In other words, I don't see why a new tool is needed.

"Michael Bernstein" <mbernst@stanford.edu> wrote in message
news:dddh0n$bd7$1@news.eclipse.org...
> Is there any documentation on how to create custom tools? I'm working on
> a tool which works like your generic ConnectionCreationTool, but instead
> of failing if the targetEditPart is null (i.e. the second click was on the
> root instead of a proper edit part), will instead create a new target edit
> part and immediately link to that.
>
> I'm having trouble because we can only be passing one kind of request
> around and though we can chain commands together it's a bit unclear to me
> how the entire process should actually work. Right now my approach is to
> extend ConnectionCreationTool, but I seem to be stumbling randomly around
> the code without really knowing with methods to override.
>
> Any direction would be greatly appreciated! Thank you all very much for
> your tireless support of this newsgroup.
> - Michael
Re: Combined Create/Connect Tool [message #191719 is a reply to message #191669] Thu, 11 August 2005 01:16 Go to previous message
Eclipse UserFriend
Originally posted by: mbernst.stanford.edu

You got it right. Thanks for the help!

Randy Hudson wrote:
> Instead of not having a target (null), why not make the diagram editpart the
> target of the second click (REQ_CONNECTION_END).
>
> The second node is free to return the original sources command, or it can
> just return some new command which does a bit more based on the source
> command.
>
> In other words, I don't see why a new tool is needed.
>
> "Michael Bernstein" <mbernst@stanford.edu> wrote in message
> news:dddh0n$bd7$1@news.eclipse.org...
>
>>Is there any documentation on how to create custom tools? I'm working on
>>a tool which works like your generic ConnectionCreationTool, but instead
>>of failing if the targetEditPart is null (i.e. the second click was on the
>>root instead of a proper edit part), will instead create a new target edit
>>part and immediately link to that.
>>
>>I'm having trouble because we can only be passing one kind of request
>>around and though we can chain commands together it's a bit unclear to me
>>how the entire process should actually work. Right now my approach is to
>>extend ConnectionCreationTool, but I seem to be stumbling randomly around
>>the code without really knowing with methods to override.
>>
>>Any direction would be greatly appreciated! Thank you all very much for
>>your tireless support of this newsgroup.
>>- Michael
>
>
>
Previous Topic:SelectAddedObject linux BUG?
Next Topic:Sequence Diagram
Goto Forum:
  


Current Time: Sun Sep 15 05:21:39 GMT 2024

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

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

Back to the top