how to enable/disable button in eclipse plugin project -


i need enable/disable toolbar button , menu button on project start.

here toolbar code , imageenter image description here

 <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> 

enter image description here

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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -