0

我的 propertyTester 和启用处理程序有问题。该属性是 areUpdatesAvailable 并且当该属性为真时启用处理程序。处理程序执行后 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>
4

1 回答 1

1

我最终做的是在处理程序完成后使用 requestEvaluation 。

final IEvaluationService evaluationService = (IEvaluationService) window.getService(IEvaluationService.class);
        evaluationService.requestEvaluation(property);
于 2010-11-29T21:39:30.533 回答