action enablement [message #43633] |
Sun, 26 January 2003 11:36  |
Eclipse User |
|
|
|
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&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 07:40  |
Eclipse User |
|
|
|
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&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 07:40  |
Eclipse User |
|
|
|
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&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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04569 seconds