java - 执行后重新检查 rcp 处理程序

标签 java handler rcp

我的 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/

相关文章:

java - 如何修复 Eclipse RCP 中的 "Missing Constraint: Import-Package:"和 "Require-Bundle"

java - 如何在 Java 信任库中导入 jks 证书

java - 我们可以使用 POI apache 将 xlsm 转换为 xlsx

Java/正则表达式 : Negate the same character repeated twice:

android - 我想使用 mediaplayer 来录制声音,然后计算 "amplitude"以随着声音的变化上下移动 Bars

java - Socket 类和 UI 之间的通信

java - 带有嵌套 jar 的 RCP ClassNotFoundException

java - PERSISTENT 消息的性能比 NON_PERSISTENT 消息慢得多

testing - Netty SSL 处理程序单元测试

java - 在Win7上为SWT/RCP应用程序设置ApplicationId