Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Extend existing Menu(extend Menu)
Extend existing Menu [message #897297] Mon, 23 July 2012 10:11 Go to next message
Eclipse UserFriend
Hi,

i use two plugins. Each plugin should add an new Command to an existing Menuitem.
But instead of adding the Command to the existing Menuitem, each plugin creates it's own Menuitem.
The new Command is defined with an Extension in the plugin.xml . I'm using Eclipse 4.2

Is it possible to extend an existing Menuitem instead of creating a new one?
Re: Extend existing Menu [message #897552 is a reply to message #897297] Tue, 24 July 2012 09:23 Go to previous messageGo to next message
Eclipse UserFriend
AFAIK, no that is not possible. What are you trying to accomplish by extending menu items?

If you are looking to supply different behavior, that is what handlers are for. You can write multiple handlers for a single command and annotate them with @CanExecute and @Execute. @CanExecute is called to determine if a handler should be active, so you can insert your logic to distinguish between the two handlers.
Re: Extend existing Menu [message #898717 is a reply to message #897552] Fri, 27 July 2012 06:36 Go to previous message
Eclipse UserFriend
Hi,

you can contribute to your existing menu via fragments. For an example please see Eclipse Modularity.

Best regards, Lars
Previous Topic:Associating rcp exe with "this kind of file"
Next Topic:Cheat sheet on wizards
Goto Forum:
  


Current Time: Sat Jul 12 23:30:13 EDT 2025

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

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

Back to the top