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 13: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 16: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 16: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: Sat Apr 19 06:05:45 EDT 2014

Powered by FUDForum. Page generated in 0.02034 seconds