Focus on newly created connection [message #231865] |
Mon, 19 March 2007 14:44  |
Eclipse User |
|
|
|
Originally posted by: gary.pi4tech.com
When a component is created by being dragged from a palette, it
automatically obtains the focus.
However when using the connection tool, the same does not happen for the
created connection.
Is there a simple way to get the focus on the connection, without having
to specifically locate the new edit part and invoke setFocus on the viewer?
Regards
Gary
|
|
|
|
|
Re: Focus on newly created connection [message #232113 is a reply to message #232096] |
Fri, 23 March 2007 11:00  |
Eclipse User |
|
|
|
Hi Gary,
Subclass ConnectionCreationTool and override the handleCreateConnection()
method to call your selectAddedObject() method.
You can do exactly what CreationTool does, you can get the model object from
the connection request.
Cheers...
Anthony
"Gary Brown" <gary@pi4tech.com> wrote in message
news:4603BB12.8020208@pi4tech.com...
> Thanks for the suggestion, but the method you refer to is on the GMF
> CreationTool. I am not using GMF, so need to find a GEF solution.
>
>
> Pratik Shah wrote:
>> CreationTool has a selectAddedObject() method that is invoked once the
>> creation command has executed. ConnectionCreationTool doesn't. You can
>> easily add that by subclassing CCT and setting that as the tool for your
>> palette entry.
>>
>> "Gary Brown" <gary@pi4tech.com> wrote in message
>> news:etmlmu$qa6$1@utils.eclipse.org...
>>> When a component is created by being dragged from a palette, it
>>> automatically obtains the focus.
>>>
>>> However when using the connection tool, the same does not happen for the
>>> created connection.
>>>
>>> Is there a simple way to get the focus on the connection, without having
>>> to specifically locate the new edit part and invoke setFocus on the
>>> viewer?
>>>
>>> Regards
>>> Gary
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03706 seconds