Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » defining menu in one plugin, but using it in another plugin.xml and adding a visibleWhen clause and
defining menu in one plugin, but using it in another plugin.xml and adding a visibleWhen clause and [message #336932] Tue, 14 July 2009 14:07 Go to next message
No real name is currently offline No real nameFriend
Messages: 113
Registered: July 2009
Senior Member
I want to define a menu (that has a specific ordering of command items)
in one plugin but use it and modify it another plugin. Here's the scenario:

a) PluginA: Define a menu that attaches to the main menu. Defines an
order of commands that I want to make standard.

b) PluginB: I want to turn off the placement of the menu in PluginA, use
the definition of it, but then add a visibleWhen clause to customize it.

How can I accomplish this? In other words, if no changes are made, the
definition in PluginA is used, otherwise, PluginB with the changes
indicated. Or should I use some type of plugin.xml "include" mechanism
if one exists.
Re: defining menu in one plugin, but using it in another plugin.xml and adding a visibleWhen clause [message #336952 is a reply to message #336932] Wed, 15 July 2009 18:47 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

It doesn't work that way ... i.e. there's no way to include an XML
fragment from another place.

The closes you can do is define a menuContribution for a submenu that's
not included by default: menu:my.extra.command.menu

Then in your RCP app, if you place a menu with an ID of
my.extra.command.menu where you want it, it will be datafilled correctly.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:save all files before execute ant script eclipse galileo
Next Topic:Perspectives
Goto Forum:
  


Current Time: Thu Nov 27 17:29:06 GMT 2014

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

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