In Eclipse RCP, how do I disable a save toolbar button according to the "dirty" property in editor
- by paulgreg
In my eclipse RCP 3.3 application, I would like to enable or disable a 'save' toolbar button according to current editor dirty flag.
I'm trying to use the <enabledWhen tag but I can't make it work.
Here's the portion of code in plugin.xml :
<command
commandId="org.acme.command.save"
icon="icons/save.png"
id="org.acme.command.save"
style="push">
<enabledWhen>
<instanceof value="activeEditor"/>
<test property="dirty" value="true"/>
</enabledWhen>
</command>
Do you have any idea how that is supposed to work ?