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).
现在我缺少的是更新所有 UI 贡献的可能性,例如分配给命令 (1) 的 (4) 以及 (2) 添加联系人中的信息,以及切换到 (3) 添加帐户时的信息。
考虑命令的实际上下文(哪个处理程序处于活动状态等),更新命令的所有 UI 贡献的一般推荐方法是什么。在 Eclipse 3.x 中,我们有类似的东西元素更新器 http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fui%2Fcommands%2FIElementUpdater.html它负责进行相应的更新。
感谢您的提示! - 并行讨论日食论坛 https://www.eclipse.org/forums/index.php/mv/msg/789832/1395817/#msg_1395817
我致力于寻找解决方案,并在我的文档中概述了当前状态blog http://www.descher.at/descher-vu/2014/07/e4-updating-ui-contributions-on-context-switch/.
您可以在您的类和下面的语句中注入 IEventBroker,该语句将检查应用程序中的所有 UI 启用
eventBroker.send(UIEvents.REQUEST_ENABLEMENT_UPDATE_TOPIC, UIEvents.ALL_ELEMENT_ID);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)