Mix E3 and E4 In one Application

≡放荡痞女 提交于 2019-12-12 09:23:43

问题


It doesn't seem E4 is usable for a productive environment yet, but the compatibility layer has many bugs as well.

Can I mix both in one application, to choose the one with less bugs for each use case?

I assume that's not possible, because the plugin.xml has to look like this:

<extension id="product" point="org.eclipse.core.runtime.products">
  <product name="Application"
           <!-- this application ID is used for E3 applications -->           
           application="org.acme.application"
           <!-- this application ID is used for E4 applications -->
           application="org.eclipse.e4.ui.workbench.swt.E4Application">
     <property name="appName" value="Application" />
   </product>
</extension>

So I can either start an E3 application or an E4 one. And if I start to use a fragment.e4xmi without a full E4 application, I get the weirdest exceptions, like:

The added object 'org.eclipse.e4.ui.model.application.ui.menu.impl.ToolBarSeparatorImpl@192d74fb (elementId: independent.toolbarseparator.0, tags: null, contributorURI: platform:/plugin/org.acme.module) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null)' is not assignable to 'org.eclipse.e4.ui.model.application.ui.basic.MTrimElement'

And even if it was possible, I wouldn't know how to mix and match commands, handlers and the menu contributions. (Which is the actual use case: Since the IEvaluationService doesn't work anymore, I thought I'd replace it with a brand new E4 handler.)

So is it possible to mix E3 and E4? If so, how?

来源:https://stackoverflow.com/questions/43846245/mix-e3-and-e4-in-one-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!