问题
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