Enabling a menu item after disabling it through xml [message #445175] |
Wed, 27 October 2004 09: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
|
|
|
Re: Enabling a menu item after disabling it through xml [message #445654 is a reply to message #445175] |
Mon, 08 November 2004 13:29  |
Eclipse User |
|
|
|
Please ask this question in the eclipse paltform newsgroup:
news://news.eclipse.org/eclipse.platform
"Sushila Padiyar" <Sushila.Padiyar@compuware.com> wrote in message
news:clo7ig$1cb$1@eclipse.org...
>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.03073 seconds