Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » action enablement
action enablement [message #43633] Sun, 26 January 2003 16:36 Go to next message
ilan klein is currently offline ilan kleinFriend
Messages: 20
Registered: July 2009
Junior Member
Hi all
I need to use the enablemnt featuer for an action in the project i am
working on.
the problem is i cannot make it work.
I have a login and logout actions, and I want to programaticly configure the
logout to become enabled in the menu when the loggin has succeeded.

<action
label="Log&amp;out"
icon="icons/sample.gif"
description="Logout action"
tooltip="Login toolbar action"
class="LogoutAction"
menubarPath="programMenu/LoginGroup"
id="LogoutAction">
<enablement>
<and>
<objectClass
name="Login">
</objectClass>
<objectState
name="loginState"
value="Login">
</objectState>
</and>
</enablement>

i assume that in class Login.java I should have a IActionFilter interface
implemented and i have done that.
but when i run the program i never get there (I return true all the time and
still the action is not enabled, and i do a print too).

please help me understand this mechanizem

ILAN
Re: action enablement [message #43731 is a reply to message #43633] Mon, 27 January 2003 12:40 Go to previous message
ilan klein is currently offline ilan kleinFriend
Messages: 20
Registered: July 2009
Junior Member
Another question I have is after my plug in is working, how do I access the
actions I setup in the XML file, whether it is to set the visibility and
enablement or to run the action programmatically.

I need to do this because I don't want my Action to have listeners on them
to my other classes, I want to keep it nice and simple.

ILAN
"ilan" <iklein@il.ibm.com> wrote in message
news:b111jt$u19$1@rogue.oti.com...
> Hi all
> I need to use the enablemnt featuer for an action in the project i am
> working on.
> the problem is i cannot make it work.
> I have a login and logout actions, and I want to programaticly configure
the
> logout to become enabled in the menu when the loggin has succeeded.
>
> <action
> label="Log&amp;out"
> icon="icons/sample.gif"
> description="Logout action"
> tooltip="Login toolbar action"
> class="LogoutAction"
> menubarPath="programMenu/LoginGroup"
> id="LogoutAction">
> <enablement>
> <and>
> <objectClass
> name="Login">
> </objectClass>
> <objectState
> name="loginState"
> value="Login">
> </objectState>
> </and>
> </enablement>
>
> i assume that in class Login.java I should have a IActionFilter interface
> implemented and i have done that.
> but when i run the program i never get there (I return true all the time
and
> still the action is not enabled, and i do a print too).
>
> please help me understand this mechanizem
>
> ILAN
>
>
Re: action enablement [message #589449 is a reply to message #43633] Mon, 27 January 2003 12:40 Go to previous message
ilan klein is currently offline ilan kleinFriend
Messages: 20
Registered: July 2009
Junior Member
Another question I have is after my plug in is working, how do I access the
actions I setup in the XML file, whether it is to set the visibility and
enablement or to run the action programmatically.

I need to do this because I don't want my Action to have listeners on them
to my other classes, I want to keep it nice and simple.

ILAN
"ilan" <iklein@il.ibm.com> wrote in message
news:b111jt$u19$1@rogue.oti.com...
> Hi all
> I need to use the enablemnt featuer for an action in the project i am
> working on.
> the problem is i cannot make it work.
> I have a login and logout actions, and I want to programaticly configure
the
> logout to become enabled in the menu when the loggin has succeeded.
>
> <action
> label="Log&amp;out"
> icon="icons/sample.gif"
> description="Logout action"
> tooltip="Login toolbar action"
> class="LogoutAction"
> menubarPath="programMenu/LoginGroup"
> id="LogoutAction">
> <enablement>
> <and>
> <objectClass
> name="Login">
> </objectClass>
> <objectState
> name="loginState"
> value="Login">
> </objectState>
> </and>
> </enablement>
>
> i assume that in class Login.java I should have a IActionFilter interface
> implemented and i have done that.
> but when i run the program i never get there (I return true all the time
and
> still the action is not enabled, and i do a print too).
>
> please help me understand this mechanizem
>
> ILAN
>
>
Previous Topic:KDE, Eclipse, and font sizes
Next Topic:a trifling 2 improvement
Goto Forum:
  


Current Time: Fri Mar 29 14:09:48 GMT 2024

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

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

Back to the top