Enabling a menu item after disabling it through xml [message #445175] |
Wed, 27 October 2004 13:24 |
Eclipse User |
|
|
|
Originally posted by: Sushila.Padiyar.compuware.com
I have a menu item "Stop" that needs to be initially disabled and I have
accomplished that by the following in my plugin.xml(since there is no such
systemproperty when the plugin gets loaded)
<action
label="Stop"
icon="icons/Stop.gif"
class="StopAction"
tooltip="Stop"
menubarPath="testMenu/testGroup"
id="StopAction">
<enablement>
<systemProperty name="stop" value="true"/>
</enablement>
</action>
What do I need to do when I have to enable it? I have used the following
method and by means of debugging , verified that the systemproperty gets
set. However I dont see the menu item getting enabled...
public static void setEnabled(final boolean enable) {
if(enable){
System.setProperty("stop", "true");
}else{
System.setProperty(("stop", "false");
}
}
TIA,
Sushila
p.s: Any suggestions on how a menu item is initially disabled and can then
be programatically enabled is greatly welcome
|
|
|
|
Powered by
FUDForum. Page generated in 0.03482 seconds