You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.ClassCastException: class org.eclipse.e4.ui.model.application.commands.impl.BindingContextImpl cannot be cast to class java.util.List (org.eclipse.e4.ui.model.application.commands.impl.BindingContextImpl is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @487cb74a; java.util.List is in module java.base of loader 'bootstrap')
at org.eclipse.emf.ecore.util.EcoreEList.set(EcoreEList.java:457)
at org.eclipse.e4.ui.model.internal.ModelUtils.mergeList(ModelUtils.java:190)
at org.eclipse.e4.ui.model.internal.ModelUtils.merge(ModelUtils.java:152)
at org.eclipse.e4.ui.model.fragment.impl.StringModelFragmentImpl.mergeIdList(StringModelFragmentImpl.java:345)
at org.eclipse.e4.ui.model.fragment.impl.StringModelFragmentImpl.merge(StringModelFragmentImpl.java:323)
at ro.linic.ui.base.eclipse.fixes.ModelAssembler.processModelFragment(ModelAssembler.java:640)
at ro.linic.ui.base.eclipse.fixes.ModelAssembler.processFragment(ModelAssembler.java:529)
at ro.linic.ui.base.eclipse.fixes.ModelAssembler.processFragments(ModelAssembler.java:489)
at ro.linic.ui.base.eclipse.fixes.ModelAssembler.processFragmentWrappers(ModelAssembler.java:459)
at ro.linic.ui.base.eclipse.fixes.ModelAssembler.processFragments(ModelAssembler.java:386)
at ro.linic.ui.base.eclipse.fixes.ModelAssembler.processModel(ModelAssembler.java:331)
at ro.linic.ui.base.eclipse.fixes.ResourceHandler.loadMostRecentModel(ResourceHandler.java:187)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:371)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:247)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:155)
I get the exception above when using notexists flag for a fragment. The problem seems to be in EcoreEList.set where the parameter is cast to a list, but in ModelUtils.mergeList we can see that the element is an instance of MApplicationElement, not a list. In ModelUtils.mergeList line 190 the setting is an instance of EObjectResolvingEList.
Note: ro.linic.ui.base.eclipse.fixes.ModelAssembler is just a copy of org.eclipse.e4.ui.internal.workbench.ModelAssembler.
I get the exception above when using notexists flag for a fragment. The problem seems to be in EcoreEList.set where the parameter is cast to a list, but in ModelUtils.mergeList we can see that the element is an instance of MApplicationElement, not a list. In ModelUtils.mergeList line 190 the setting is an instance of EObjectResolvingEList.
Note: ro.linic.ui.base.eclipse.fixes.ModelAssembler is just a copy of org.eclipse.e4.ui.internal.workbench.ModelAssembler.
Note: Applying the fix from https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/144622/4/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ModelAssembler.java meaning removing the existing elements from the fragment before merging seems to fix this exception.
The text was updated successfully, but these errors were encountered: