code from two years back必须升级到E4,现在一堆东西不再工作了。其中一个是IEvaluationService
如果使用的话是这样的:PropertyTester的触发器评估
<handler class="org.acme.PrintHandler" commandId="org.eclipse.ui.file.print">
<activeWhen>
<with variable="activePart">
<test property="org.acme.printable" />
</with>
</activeWhen>
</handler>
IEvaluationService service = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class);
service.requestEvaluation("org.acme.printable");
如何(重新)触发PropertyTester
的评价是什么?由于E4甚至还没有接近生产准备,所以我需要一个针对E3(兼容层)的解决方法。
Related question - 但此用户正在搜索E4中的等价物,而我需要一个在E3中工作的人。
有趣的是,如果我用<enabledWhen>
代替<activeWhen>
标签,它的作品。在这种情况下,IEventBroker#post
和IEventBroker#send
也可以工作。
这是一个similar question。该用户使用Eclipse 4.2 - 我用4.5,4.6和4.7测试了这个问题。
见这并不只针对标签'',不''工作。但是'IEvaluationService'也适用于''。 –