Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Another property evaluation question
Another property evaluation question [message #1385321] Thu, 05 June 2014 15:15 Go to next message
Greg Watson is currently offline Greg WatsonFriend
Messages: 115
Registered: July 2009
Senior Member
I'm using Eclipse 4.4RC3.

I have a toolbar with buttons that I want to enable/disable based on the value of a property. The value of the property can change at arbitrary times, so I'm trying to force it to be re-evaluated. However the buttons are only updated when the selection changes.

The handler is defined as:

<handler
class="org.eclipse.ptp.internal.rm.lml.monitor.ui.handlers.RemoveMonitorHandler"
commandId="org.eclipse.ptp.rm.lml.monitor.ui.removeMonitor">
<enabledWhen>
<with
variable="selection">
<test
property="org.eclipse.ptp.rm.monitor.isActive"
value="false">
</test>
</with>
</enabledWhen>
</handler>

When the property changes, I call IEvaluationService#requestEvaluation("org.eclipse.ptp.rm.monitor.isActive") but the enabled state of the button does not change.

I've tried using the expression:

<enabledWhen>
<test
property="org.eclipse.ptp.rm.monitor.isActive"
value="false">
</test>
</enabledWhen>

but this doesn't make any difference because, I assume, that the default variable is still "selection".

Am I missing something here?

Re: Another property evaluation question [message #1385368 is a reply to message #1385321] Thu, 05 June 2014 21:28 Go to previous message
Greg Watson is currently offline Greg WatsonFriend
Messages: 115
Registered: July 2009
Senior Member
I think this is a bug. I've opened Bug 436755.
Previous Topic:Auto open and auto save
Next Topic:Query on SaveableHelper
Goto Forum:
  


Current Time: Fri Apr 19 17:06:02 GMT 2024

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

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

Back to the top