我的 propertyTester 和启用处理程序遇到问题。该属性为 areUpdatesAvailable,并且当该属性为 true 时启用处理程序。处理程序执行后,areUpdatesAvailable 值变为 false,但我目前的设置方式是,它仅检查选择何时更改。因此,如果我右键单击某个项目并调用更新处理程序,然后再次右键单击该项目而不更改我的选择,则更新仍处于启用状态,因为它不会再次调用属性测试器。有没有办法让它在执行处理程序后再次检查?
<handler
class="com.cerner.automation.touchstone.handlers.UpdateExternalReference"
commandId="com.cerner.automation.touchstone.workflow.Update">
<enabledWhen>
<with
variable="selection">
<test
property="com.cerner.automation.touchstone.testers.nodeItem.areUpdatesAvailable" value="true" forcePluginActivation="true">
</test>
<iterate
ifEmpty="false"
operator="and">
<instanceof
value="com.cerner.automation.touchstone.model.ExternalReferenceItem">
</instanceof>
</iterate>
<test
forcePluginActivation="true"
property="com.cerner.automation.touchstone.testers.nodeItem.isInternal"
value="true">
</test>
</with>
</enabledWhen>
</handler>
最佳答案
我最终做的是在处理程序完成后使用 requestEvaluation。
final IEvaluationService evaluationService = (IEvaluationService) window.getService(IEvaluationService.class);
evaluationService.requestEvaluation(property);
关于java - 执行后重新检查 rcp 处理程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3065375/