Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » activeWhen and enabledWhen problem
activeWhen and enabledWhen problem [message #334167] Fri, 23 January 2009 02:21 Go to next message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

Hi,

[XML]
<activeWhen>
<with
variable="activePartId">
<equals
value="com.seq.view.DatabaseManagerView">
</equals>
</with>
</activeWhen>
<enabledWhen>
<with
variable="myVariable">
<equals
value="true">
</equals>
</with>
</enabledWhen>
[XML]

when the 'myVariable' is false and when i click on the DatabaseManagerView ,
the command is inactive - which is right. But when i click on a different
view say Package Explorer the command gets enabled ( the toolbar icon gets
enabled ). Isnt that supposed to remain inactive because the active part is
changed and doesnot meet the activeWhen condition.

Kathir.
Re: activeWhen and enabledWhen problem [message #334170 is a reply to message #334167] Fri, 23 January 2009 06:35 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
You might be having another handler which is active in other view. Did you
define a default handler for that command?

- Prakash
--

http://blog.eclipse-tips.com

"Kathir" <kathir@atc.tcs.com> wrote in message
news:glb9jm$9qs$1@build.eclipse.org...
> Hi,
>
> [XML]
> <activeWhen>
> <with
> variable="activePartId">
> <equals
> value="com.seq.view.DatabaseManagerView">
> </equals>
> </with>
> </activeWhen>
> <enabledWhen>
> <with
> variable="myVariable">
> <equals
> value="true">
> </equals>
> </with>
> </enabledWhen>
> [XML]
>
> when the 'myVariable' is false and when i click on the DatabaseManagerView
> , the command is inactive - which is right. But when i click on a
> different view say Package Explorer the command gets enabled ( the toolbar
> icon gets enabled ). Isnt that supposed to remain inactive because the
> active part is changed and doesnot meet the activeWhen condition.
>
> Kathir.
>
Re: activeWhen and enabledWhen problem [message #334175 is a reply to message #334170] Fri, 23 January 2009 10:55 Go to previous messageGo to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
By the way, very interesting your blog http://blog.eclipse-tips.com to any
Eclipse developer. :-)

Prakash G.R. wrote:

> You might be having another handler which is active in other view. Did you
> define a default handler for that command?

> - Prakash
Re: activeWhen and enabledWhen problem [message #334184 is a reply to message #334170] Fri, 23 January 2009 18:08 Go to previous message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

Thanks prakash..I had a default handler which was causing it to enable.

kathir.

"Prakash G.R." <grprakash@gmail.com> wrote in message
news:glboer$k7v$1@build.eclipse.org...
> You might be having another handler which is active in other view. Did you
> define a default handler for that command?
>
> - Prakash
> --
>
> http://blog.eclipse-tips.com
>
> "Kathir" <kathir@atc.tcs.com> wrote in message
> news:glb9jm$9qs$1@build.eclipse.org...
>> Hi,
>>
>> [XML]
>> <activeWhen>
>> <with
>> variable="activePartId">
>> <equals
>> value="com.seq.view.DatabaseManagerView">
>> </equals>
>> </with>
>> </activeWhen>
>> <enabledWhen>
>> <with
>> variable="myVariable">
>> <equals
>> value="true">
>> </equals>
>> </with>
>> </enabledWhen>
>> [XML]
>>
>> when the 'myVariable' is false and when i click on the
>> DatabaseManagerView , the command is inactive - which is right. But when
>> i click on a different view say Package Explorer the command gets enabled
>> ( the toolbar icon gets enabled ). Isnt that supposed to remain inactive
>> because the active part is changed and doesnot meet the activeWhen
>> condition.
>>
>> Kathir.
>>
>
>
Previous Topic:How to provide duplicating a file within a project ?
Next Topic:Duplicate plug-in entries in "Plug-in Details"
Goto Forum:
  


Current Time: Wed Jul 17 18:26:20 GMT 2024

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

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

Back to the top