【发布时间】:2011-06-09 14:44:26
【问题描述】:
我在尝试从上下文菜单中删除对添加插入点的一些插件贡献时遇到了一些问题。在大多数情况下,我使用活动并且这很有效,因为大多数贡献都是通过操作完成的。但在其他一些情况下,贡献是弹出菜单贡献,我无法成功禁用这些条目。一个例子是 Source->Format 菜单的贡献。贡献由插件 org.eclipse.wst.sse.ui 通过以下方式完成:
<menuContribution
locationURI="popup:org.eclipse.ui.popup.any?after=additions">
<menu
id="sourceMenuId"
label="%Source">
<command
commandId="org.eclipse.wst.sse.ui.format"
id="sourceFormat"
style="push">
<!-- Check to make sure that the handler is enabled before making visible -->
<visibleWhen checkEnabled="true" />
</command>
</menu>
</menuContribution>
我一直在尝试使用模式 org.eclipse.wst.sse.ui/sourceFormat 和 org.eclipse.wst.sse.ui/.*。它们都在 Ecipe HELIOS 中工作,但在 RAD(Rational Application Developer 8.0.2)中不工作。 有没有其他方法可以禁用此弹出菜单贡献?请问这个问题和Eclipse版本有关吗?
【问题讨论】:
标签: popup contextmenu rad