Wrong menu structure in an Eclipse RCP application
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?
Got the answer at http://www.eclipse.org/forums/index.php?t=rview&goto=681772#msg_681772: the problem is that two menus have the same id.
精彩评论