how to enable/disable button in eclipse plugin project -
i need enable/disable toolbar button , menu button on project start.
<toolbar id="socenterprise.toolbar"> <command commandid="socenterprise.ipxact.handler" helpcontextid="generate help" icon="icons/generate16.png" id="generator" label="generate xml (ip-xact)" style="pulldown" tooltip="ip-xact"> </command> </toolbar> and need enable/disable popupmenu button menu bar. here code
<menu label="generate"> <command commandid="socenterprise.alloutputs.handler" label="all outputs" style="push" tooltip="generate outputs"> </command> <command commandid="socenterprise.ipxact2.hanlder" label="ipxact" style="push" tooltip="ipxact"> </command>
the enabled state of handler command determines if menu / toolbar item enable. in org.eclipse.ui.handlers extension point define handler.
<extension point="org.eclipse.ui.handlers"> <handler commandid="commandid" class="package.handler"> <enabledwhen> ... enabled when expression </enabledwhen> </handler> </extension> 

Comments
Post a Comment