Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Multiple menus in a single contribution
Multiple menus in a single contribution [message #681706] Thu, 09 June 2011 17:02 Go to next message
Alexey Romanov is currently offline Alexey Romanov
Messages: 263
Registered: May 2010
Senior Member
In `plugin.xml` for my application, I have

<extension
     point="org.eclipse.ui.menus">
  <menuContribution
        allPopups="false"
        locationURI="menu:org.eclipse.ui.main.menu">
     <menu
           id="ru.focusmedia.odp.arm.menus.arm"
           label="ARM"
           mnemonic="A">
        <command
              commandId="org.eclipse.ui.file.exit"
              style="push">
        </command>
     </menu>
     <menu
           id="ru.focusmedia.odp.arm.menus.arm"
           label="Help"
           mnemonic="H">
        <command
              commandId="org.eclipse.ui.help.aboutAction"
              style="push">
        </command>
     </menu>
  </menuContribution>
</extension>


and expect it to create two menus in the main menubar, each with one item. However, I get only one menu (ARM) which contains both items (and no Help menu at all). Why? And how do I get the desired result?
Re: Multiple menus in a single contribution [message #681772 is a reply to message #681706] Thu, 09 June 2011 20:27 Go to previous messageGo to next message
Catalin Gerea is currently offline Catalin Gerea
Messages: 89
Registered: July 2009
Location: Bucharest, Romania
Member

Change the id of your second menu to "ru.focusmedia.odp.arm.menus.help"
Because both menus had the same id only one menu with two entries were created.


Time is what you make of it.
Re: Multiple menus in a single contribution [message #681778 is a reply to message #681772] Thu, 09 June 2011 20:43 Go to previous message
Alexey Romanov is currently offline Alexey Romanov
Messages: 263
Registered: May 2010
Senior Member
Thanks! I was sure I entered different IDs in the "Extensions" editor tab originally, but apparently changed it along the way and didn't notice Embarrassed
Previous Topic:Don't understand Eclipse - MVC, yet
Next Topic:ActionProvider for a TabbedPropertyPage
Goto Forum:
  


Current Time: Wed Sep 24 00:38:38 GMT 2014

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

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