在e4应用程序模型中更新处理程序开关上的UI贡献 [英] Updating UI contributions on Handler switch in e4 application model

查看:68
本文介绍了在e4应用程序模型中更新处理程序开关上的UI贡献的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为我的e4应用程序定义了一个全局命令,即add命令。因此,您可以在
中看到该命令将在整个应用程序中使用( 1)并在上下文切换到resp时激活要被激活的代表处理程序。 (2)和(3)中的部分。

I have defined a command global to my e4 application, namely the add command. 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. parts in (2) and (3).

现在我缺少的是,可以使用以下命令更新分配给命令(1)的所有UI贡献,例如(4) (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贡献。在Eclipse 3.x中,我们有类似 IElementUpdater 正在进行相应的更新。

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.). In Eclipse 3.x we had something like the IElementUpdater which was taking care of doing the respective update.

感谢您的提示! -在 Eclipse论坛

Thanks for your hints! - Parallely discussed in Eclipse Forum

我一直在寻找解决方案,并在博客

I worked on finding a solution, and have outlined the current state in my blog.

推荐答案

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

You can inject IEventBroker in your class and below statement, this statement will check for all UI enablement in application

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

这篇关于在e4应用程序模型中更新处理程序开关上的UI贡献的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆