Menu item will disappear from menu if the commandId or commandParameter it is bound to does not exist.
Eclipse RCP 3.7 menu disappears after command paramter configured
-
05-12-2021 - |
Frage
I have a command to launch views configured in plugin.xml of an RCP application module as follows:
<extension
point="org.eclipse.ui.commands">
<command
defaultHandler="myapp.commandhandler.LaunchView"
id="myapp.command.launchview"
name="Map">
</command>
</extension>
I have configured this command to be shared across a couple of menu extensions like this:
<menuContribution
allPopups="false"
locationURI="menu:org.eclipse.ui.main.menu">
<menu
id="myapp.application.menu.showview"
label="Show View">
<command
commandId="myapp.command.launchview"
label="Map"
style="push">
</command>
<command
commandId="myapp.command.launchview"
label="Legend"
style="push">
</command>
</menu>
</menuContribution>
Now I want to pass a command parameter representing each view's ID, similar to what is being done here Eclipse RCP commands.
But when I add these parameter configurations, these menu items disappear from the main menu. Any ideas?
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow