【发布时间】:2012-11-26 18:34:37
【问题描述】:
我有一个命令来启动在 RCP 应用程序模块的 plugin.xml 中配置的视图,如下所示:
<extension
point="org.eclipse.ui.commands">
<command
defaultHandler="myapp.commandhandler.LaunchView"
id="myapp.command.launchview"
name="Map">
</command>
</extension>
我已将此命令配置为在几个菜单扩展之间共享,如下所示:
<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>
现在我想传递一个代表每个视图 ID 的命令参数,类似于这里 Eclipse RCP commands 所做的。
但是当我添加这些参数配置时,这些菜单项从主菜单中消失了。有什么想法吗?
【问题讨论】:
标签: eclipse-plugin eclipse-rcp commandparameter