Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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.
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
Eclipse UserFriend
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 Jul 23 10:53:51 EDT 2025

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

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

Back to the top