문제

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?

도움이 되었습니까?

해결책

Menu item will disappear from menu if the commandId or commandParameter it is bound to does not exist.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top