activeWhen is not evaluated by IEvaluationService.requestEvaluation [message #1856056] |
Thu, 17 November 2022 16:25 |
Page Mising name 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.
|
|
|
Powered by
FUDForum. Page generated in 0.02373 seconds