|
Re: How to create global actions with dynamic label and enablent [message #819786 is a reply to message #819754] |
Tue, 13 March 2012 10:23 |
|
AFAIK it's not possible to do with out-dated Actions. Actions are considered out-dated, checkout Commands Framework instead. In case of Command Frameworks it is achievable with
<extension point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="menu:com.virtage.plexflow.menu.file?after=additions">
<command
commandId="com.virtage.plexflow.ui.explorer.NewContainer"
label="New folder...">
<!-- visible when Explorer editor is focused -->
<visibleWhen>
<with variable="activePartId">
<equals
value="com.virtage.plexflow.ui.explorer.ExplorerEditor">
</equals>
</with>
</visibleWhen>
</command>
</menuContribution>
...
There's a lot of possible <visibleWhen> conditions that are made win use of so-called core expressions.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04560 seconds