Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Extend existing Menu(extend Menu)
Extend existing Menu [message #897297] Mon, 23 July 2012 14:11 Go to next message
Bastian S is currently offline Bastian S
Messages: 1
Registered: July 2012
Junior Member
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 13:23 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph Carroll
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

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 10:36 Go to previous message
Lars Vogel is currently offline Lars Vogel
Messages: 1049
Registered: July 2009
Senior Member

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: Sun Sep 21 22:19:12 GMT 2014

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

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