Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Enabling a menu item after disabling it through xml
Enabling a menu item after disabling it through xml [message #445175] Wed, 27 October 2004 13:24 Go to next message
Eclipse UserFriend
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 18:29 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
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
>
>
>
Previous Topic:Mac OS X drag and drop
Next Topic:Load TTF file into Font?
Goto Forum:
  


Current Time: Fri Apr 26 07:30:06 GMT 2024

Powered by FUDForum. Page generated in 0.03482 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top