Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » activeWhen is not evaluated by IEvaluationService.requestEvaluation
activeWhen is not evaluated by IEvaluationService.requestEvaluation [message #1856056] Thu, 17 November 2022 16:25
Page Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
Member
Hi,

I have defined a handler with activeWhen clause, something like:
<extension
point="org.eclipse.ui.handlers">
<handler
commandId="com.myapp.userSetting"
class="com.myapp.handlers.CustomUserSettingHandler">
<activeWhen>
<test
property="com.myapp.user.role"
value="PWTest">
</test>
</activeWhen>
</handler>
</extension>

If user switches role to "PWTest", it should active this custom handler.

When role is changed, code calls following to request re-evaluation.
IEvaluationService evalService = PlatformUI.getWorkbench().getService( IEvaluationService.class );
evalService.requestEvaluation( "com.myapp.user.role" );

However, I don't see property tester is called after role change.

In debug, I found EvaluationService.requestEvaluation() method goes through EvaluationService.refs list to do the re-eval, but this list only holds enableWhen, not activeWhen.

Did I miss anything here?

Any help is greatly appreciated.

Thanks.
Previous Topic:Eclipse RCP with Lombok and/or MapStruct ?
Next Topic:How can i add multiple banner with eclipse rcp?
Goto Forum:
  


Current Time: Thu Apr 25 21:27:30 GMT 2024

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

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

Back to the top