2
我想基於透視圖在工具欄上顯示命令。我已經使用核心表達式來實現這一點,如下所示。基於透視圖在工具欄上顯示命令
<extension point="org.eclipse.core.expressions.definitions">
<definition id="onValidationPerspective">
<with variable="activeWorkbenchWindow.activePerspective">
<equals value="com.sample.perspective1"/>
</with>
</definition>
</extension>
我已經在命令標籤中使用了這個如下。
<command
commandId="com.sample.run.root"
icon="icons/run_exc.gif"
label="Reset Card"
style="pulldown">
<visibleWhen checkEnabled="false">
<reference
definitionId="onValidationPerspective">
</reference>
</visibleWhen>
</command>
上述代碼工作正常。
但我想擴展這個多視角,即我想在兩個角度,即com.sample.perspective1
和com.sample.perspective2
在工具欄上顯示命令。
如何使用核心表達式實現此目的?
感謝您的指針,它的工作完美。 – Syam 2012-04-18 05:20:16