0
我有這樣定義的菜單項:啓用和禁用org.eclipse.ui.actionSets
<extension point="org.eclipse.ui.actionSets">
<actionSet
description="My Sample"
id="MySample.actionSet"
label="My Sample"
visible="true">
<menu
id="mysample.actionset.menu1"
label="My Sample">
<groupMarker
name="mysample.groupCreatesimilar">
</groupMarker>
</menu>
<action
class="org.mysample.actions.create.MyCreateCodeAction"
definitionId="MySample.myCreateCode.command"
id="MySample.myCreateCode.command"
label="Create Sample Code"
menubarPath="mysample.actionset.menu1/mysample.groupMarker2">
</action>
</actionSet>
</extension>
以上actionSet有許多其他的行動。我希望根據首選項變量的值啓用或禁用操作(菜單)「創建示例代碼」。我怎樣才能做到這一點?