[re-opened] Order of mixed 'action' and 'command' menu items in RCP [message #777348] |
Tue, 10 January 2012 10:11 |
|
At the moment I have two menus in my RCP application: File and Help.
The File menu is created via a command:
<extension point="org.eclipse.ui.menus">
<menuContribution allPopups="false"
locationURI="menu:org.eclipse.ui.main.menu">
<menu
id="fileMenu"
label="File"
mnemonic="F"
tooltip="Main Menu">
<command
commandId="myPlugin.bundle.menuCommands.Exit"
label="Exit"
mnemonic="E"
style="push"
tooltip="Exits MyPlugin">
</command>
</menu>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.commands">
<command defaultHandler="myPlugin.bundle.commands.exit.ExitHandler"
id="myPlugin.bundle.menuCommands.Exit"
name="Exit">
</command>
</extension>
The Help menu (with only the About menu item) is created via the respective action in ApplicationActionBarAdvisor:
protected void makeActions(IWorkbenchWindow window) {
aboutAction = ActionFactory.ABOUT.create(window);
register(aboutAction);
}
protected void fillMenuBar(IMenuManager menuBar) {
MenuManager helpMenu = new MenuManager("&Help", "helpMenu");
helpMenu.add(aboutAction);
menuBar.add(helpMenu);
}
Now, the Help menu comes before the File menu in the menu bar. This is obviously not how it's supposed to be. How can I change the order of the menus?
Many thanks!
[Updated on: Tue, 10 January 2012 11:45] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03785 seconds