Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Get menu button with specific id
Get menu button with specific id [message #1714277] Wed, 11 November 2015 09:36 Go to next message
Tuan Hoang Anh is currently offline Tuan Hoang AnhFriend
Messages: 42
Registered: May 2015
Hi all,

I add a menu button using plugin extension. And I want to manage that button with the specific ID that is defined in plugin.xml.
              tooltip="Stop Application">

Could anyone tell me how to get the list of all button with the same Id "stopCommand"? I want to edit the button (change icon, set text, set tooltip) anywhere.

Best Regards,
Tuan Hoang
Re: Get menu button with specific id [message #1714321 is a reply to message #1714277] Wed, 11 November 2015 17:59 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 764
Registered: January 2012
Senior Member

Changing the icon, text, and tooltip are the preserve of the command's current handler: remember that with the command/handler paradigm, another more-applicable handler may be bound to "your" command. Cause your handler to implement IElementUpdater. And call ICommandService.refreshElements(commandId) when a situation arises that you need to trigger updates on possible UI bindings of the command.

Hope that helps.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Define save action in plugin
Next Topic:Late startup?
Goto Forum:

Current Time: Wed Jul 18 23:51:33 GMT 2018

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

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

Back to the top