Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Handler, activeWhen, PropertyTester and multiple selections
Handler, activeWhen, PropertyTester and multiple selections [message #326332] Sat, 15 March 2008 09:02 Go to next message
Timo Rohwedder is currently offline Timo RohwedderFriend
Messages: 7
Registered: July 2009
Junior Member
Hi everyone!

I'm using a handler for a command that should be active when the
internal state of the selected item is 'unlocked'. 'unlocked' is a user
defined value and checked with a PropertyTester class.

My problem: when I selected multiple items and one of them has the state
'locked' the handler is not active. I understand: an and condition :-)
but can I change this to an or condition?

Thanks for reading and solutions!

Timo
Re: Handler, activeWhen, PropertyTester and multiple selections [message #326335 is a reply to message #326332] Sat, 15 March 2008 15:27 Go to previous messageGo to next message
Uwe Stieber is currently offline Uwe StieberFriend
Messages: 19
Registered: July 2009
Junior Member
Hi,

> Hi everyone!
>
> I'm using a handler for a command that should be active when the internal
> state of the selected item is 'unlocked'. 'unlocked' is a user defined
> value and checked with a PropertyTester class.
>
> My problem: when I selected multiple items and one of them has the state
> 'locked' the handler is not active. I understand: an and condition :-) but
> can I change this to an or condition?

....
<activeWhen>
<with variable="selection">
<iterate operator="or">
<test property="...your property..." value="unlocked"/>
</iterate>
</with>
</activeWhen>
....

should do.

Regards,
Uwe Stieber
Re: Handler, activeWhen, PropertyTester and multiple selections [message #326500 is a reply to message #326335] Fri, 21 March 2008 07:52 Go to previous message
Timo Rohwedder is currently offline Timo RohwedderFriend
Messages: 7
Registered: July 2009
Junior Member
Thanks! That's it!

Uwe Stieber schrieb:
> Hi,
>
>> Hi everyone!
>>
>> I'm using a handler for a command that should be active when the internal
>> state of the selected item is 'unlocked'. 'unlocked' is a user defined
>> value and checked with a PropertyTester class.
>>
>> My problem: when I selected multiple items and one of them has the state
>> 'locked' the handler is not active. I understand: an and condition :-) but
>> can I change this to an or condition?
>
> ....
> <activeWhen>
> <with variable="selection">
> <iterate operator="or">
> <test property="...your property..." value="unlocked"/>
> </iterate>
> </with>
> </activeWhen>
> ....
>
> should do.
>
> Regards,
> Uwe Stieber
>
>
Previous Topic:Unit Testing
Next Topic:relative path inside a plugin
Goto Forum:
  


Current Time: Sat Jul 27 16:25:34 GMT 2024

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

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

Back to the top