简体   繁体   English

在e4应用程序模型中更新Handler交换机上的UI贡献

[英]Updating UI contributions on Handler switch in e4 application model

I have defined a command global to my e4 application, namely the add command. 我已经为我的e4应用程序定义了一个全局命令,即add命令。 So, as you can see in 所以,正如你所看到的那样 我的示例应用程序模型 the command is to used throughout the application (1) and to the repsective handler to be activated on context switch to the resp. 该命令将在整个应用程序(1)中使用,并在上下文切换到resp时激活repsective处理程序。 parts in (2) and (3). (2)和(3)中的部分。

Now what I am missing, is the possibility to update all UI contributions like (4) allocated to command (1) with the information such as in (2) add contact, and when switching to (3) add account. 现在我缺少的是,可以更新所有UI贡献,如(4)分配给命令(1)的信息,如(2)添加联系人,以及切换到(3)添加帐户时的信息。

What is the general recommended way to update all UI contributions of a command considering the actual context of the command (which handler is active etc.). 考虑命令的实际上下文(哪个处理程序处于活动状态等),更新命令的所有UI贡献的一般建议方法是什么。 In Eclipse 3.x we had something like the IElementUpdater which was taking care of doing the respective update. 在Eclipse 3.x中,我们有类似IElementUpdater的东西,它负责进行相应的更新。

Thanks for your hints! 谢谢你的提示! - Parallely discussed in Eclipse Forum - 在Eclipse论坛中平行讨论

I worked on finding a solution, and have outlined the current state in my blog . 我一直致力于寻找解决方案,并在我的博客中概述了当前的状态。

您可以在类和下面的语句中注入IEventBroker,此语句将检查应用程序中的所有UI启用

    eventBroker.send(UIEvents.REQUEST_ENABLEMENT_UPDATE_TOPIC, UIEvents.ALL_ELEMENT_ID);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM