Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to get the active tool from the palette?
How to get the active tool from the palette? [message #2313] Tue, 01 August 2006 17:56 Go to next message
Eclipse UserFriend
Hi there!

I have added a menu item to the context menu of my gmf editor and want it to
be activated only if a certain kind of tool is selected from the palette.

Therefore i want to check within the calculateEnabled() method of my action
class (which is inherited from DiagramAction) which palette tool was
selected before.

How can I do that?

Thanks in advance

Andre
TU Berlin - Tiger Project
Re: How to get the active tool from the palette? [message #6547 is a reply to message #2313] Fri, 04 August 2006 07:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: reneschm.cs.tu-berlin.de

This Topic is still hot,
doesn't anybody have an idea?

Rene

TU Berlin - Tiger Team


Andre Crema schrieb:
> Hi there!
>
> I have added a menu item to the context menu of my gmf editor and want it to
> be activated only if a certain kind of tool is selected from the palette.
>
> Therefore i want to check within the calculateEnabled() method of my action
> class (which is inherited from DiagramAction) which palette tool was
> selected before.
>
> How can I do that?
>
> Thanks in advance
>
> Andre
> TU Berlin - Tiger Project
>
>
Re: How to get the active tool from the palette? [message #6566 is a reply to message #6547] Fri, 04 August 2006 08:22 Go to previous message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

Hello!

Within your action find appropriate diagram editor part and adapt it to
GraphicalViewer; then viewer.getEditDomain().getActiveTool().

Rene Schmutzler wrote:
> This Topic is still hot,
> doesn't anybody have an idea?
>
> Rene
>
> TU Berlin - Tiger Team
>
>
> Andre Crema schrieb:
>> Hi there!
>>
>> I have added a menu item to the context menu of my gmf editor and want
>> it to be activated only if a certain kind of tool is selected from the
>> palette.
>>
>> Therefore i want to check within the calculateEnabled() method of my
>> action class (which is inherited from DiagramAction) which palette
>> tool was selected before.
>>
>> How can I do that?
>>
>> Thanks in advance
>>
>> Andre
>> TU Berlin - Tiger Project
>>
Previous Topic:Downloading source for Draw2d
Next Topic:Possible bug in generated DocumentProvider::saveDocumentToFile method?
Goto Forum:
  


Current Time: Wed May 07 11:36:50 EDT 2025

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

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

Back to the top