基于Eclipse中TabbedPropertySheetPage中当前选定的选项卡的Show \ Hide菜单

时间:2019-01-15 06:00:27

标签: eclipse eclipse-plugin

我试图基于当前选定的选项卡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>

0 个答案:

没有答案