Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to get action for main menu item?
How to get action for main menu item? [message #487341] Tue, 22 September 2009 19:36 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: September 2009
Junior Member
I would like to invoke an action that was added to the main menu by another plugin upon which my plugin depends. How can I retrieve the action associated with the menu item?

Regards,
Dave
Re: How to get action for main menu item? [message #487411 is a reply to message #487341] Wed, 23 September 2009 07:29 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
dpalmier@us.ibm.com wrote:
> I would like to invoke an action that was added to the main menu by
> another plugin upon which my plugin depends. How can I retrieve the
> action associated with the menu item?

I suggest to use the new command architecture if that is possible for
you and to invoke the command via IHandlerService#executeCommand as
described e.g. in

http://www.vogella.de/articles/EclipseCommands/article.html# commmands_button

If it isn't, maybe the hybrid technique described in

http://wiki.eclipse.org/index.php/Platform_Command_Framework #Using_an_IActionDelegate_to_execute_a_command

is acceptable as a workaround for you? I haven't used it myself, but it
looks promising and if you could take advantage of it, you can use the
same programmatic route via IHandlerService#executeCommand as suggested
above.

HTH & Greetings from Bremen,

Daniel Krügler
Previous Topic:Eclipse RCP for linux
Next Topic:How to access files within an exported project
Goto Forum:
  


Current Time: Tue Sep 24 17:21:58 GMT 2024

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

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

Back to the top