Eclipse Plugin Central

Forum Discussions - How to disable items on the Dynamic pull down on Toolbar?

roller - Apr 28, 2008 - 04:38 AM
Post subject: How to disable items on the Dynamic pull down on Toolbar?
Hi,
I added items to my Pull down on my toolbar statically and dynamically.

I have used AbstractContributionFactory to add the items dynamically. It is working fine.

<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="toolbarrg.eclipse.ui.main.toolbar?a fter=additions">
<toolbar
id="com.fmrco.insight.toolbar.myToolbar">
<command
commandId="com.fmrco.insight.toolbar.myCommand"
id="com.fmrco.insight.toolbar.com"
label="Help"
style="pulldown"
tooltip="Send the message">
<parameter
name="com.fmrco.insight.toolbar.myMessage"
value="Hello">
</parameter>
</command>
</toolbar>
</menuContribution>
<menuContribution
locationURI="menu:com.fmrco.insight.toolbar.com">
<command
commandId="com.fmrco.insight.toolbar.myCommand"
label="Welcome"
style="pulldown">
<parameter
name="com.fmrco.insight.toolbar.myMessage"
value="Welcome!!!!! ">
</parameter>
</command>
<command
commandId="com.fmrco.insight.toolbar.myCommand"
label="Dynamic Help"
style="pulldown">
<parameter
name="com.fmrco.insight.toolbar.myMessage"
value="Dynamic help window">
</parameter>
</command>
</menuContribution>
</extension>


Now i would like to disable the items on the pulldown, something like the "Back" button on the browser.

i did have a look at Menu Contributions - Eclipsepedia
which talks about visible when, enable etc.

please help me out in this.
thanks in advance.
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits