我试图基于当前选定的选项卡ID显示\隐藏“属性视图”工具栏菜单,但无法正常工作。 plugin.xml中的扩展名看起来像这样-
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="toolbar:org.eclipse.ui.views.PropertySheet">
<command
commandId="sub.request"
icon="icons/test_icon.gif"
label="Test Request"
style="push"
tooltip="Test Request">
<visibleWhen checkEnabled="false">
<with variable="selection">
<equals value="selectedTabId???"/>
</with>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.commands">
<command
description="Test Request"
id="sub.request"
name="SubRequest">
</command>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.test.SubRequestHandler"
commandId="sub.request">
</handler>
</extension>