|
Re: [EMF Forms] Values not set [message #1412925 is a reply to message #1412919] |
Wed, 27 August 2014 11:22 |
Marco Descher Messages: 197 Registered: October 2010 Location: Austria |
Senior Member |
|
|
Maybe this got to do with the XCore Backend I am using, where I generate the required ecore and genmodel files out. On selecting "Create and link domain model reference" on a property nothing happens, with the following exception occuring in the log:
org.eclipse.emf.common.util.WrappedException: java.lang.ClassCastException: org.eclipse.emf.ecore.xcore.impl.XPackageImpl cannot be cast to org.eclipse.emf.ecore.EPackage
at org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescriptor$Dynamic.getEPackage(RegistryReader.java:255)
at org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage(EPackageRegistryImpl.java:127)
at org.eclipse.emf.ecp.core.util.ECPUtil.getSubClasses(ECPUtil.java:146)
at org.eclipse.emf.ecp.view.editor.controls.DomainModelReferenceControlSWTRenderer$SelectionAdapterExtension.widgetSelected(DomainModelReferenceControlSWTRenderer.java:325)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4188)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4031)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3658)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.ClassCastException: org.eclipse.emf.ecore.xcore.impl.XPackageImpl cannot be cast to org.eclipse.emf.ecore.EPackage
at org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescriptor$Dynamic.getEPackage(RegistryReader.java:246)
... 33 more
[Updated on: Wed, 27 August 2014 11:28] Report message to a moderator
|
|
|
Re: [EMF Forms] Values not set [message #1412940 is a reply to message #1412925] |
Wed, 27 August 2014 11:56 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Marco,
What's in your model's plugin.xml?
The latest maintenance stream is more careful to use
return (EPackage)
EcoreUtil.getObjectByType(resourceSet.getResource(locationURI,
true).getContents(), EcorePackage.Literals.EPACKAGE);
If your location includes a fragment, it needs to point at the right
index within the resource, i.e., just "#/" will select the XPackage. As
a workaround if you're using a slightly older version of EMF, you can
use "#/EPackage" to refer to the EPackage in the *.xcore resources.
I'm not sure that will really work though, because a *.xcore needs a
classpath provider to resolve imports...
On 27/08/2014 1:22 PM, Marco Descher wrote:
> Maybe this got to do with the XCore Backend I am using, where I
> generate the required ecore and genmodel files out. On selecting
> "Create and link domain model reference" on a property nothing
> happens, with the following exception occuring in the log:
>
>
> org.eclipse.emf.common.util.WrappedException:
> java.lang.ClassCastException:
> org.eclipse.emf.ecore.xcore.impl.XPackageImpl cannot be cast to
> org.eclipse.emf.ecore.EPackage
> at
> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescriptor$Dynamic.getEPackage(RegistryReader.java:255)
> at
> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage(EPackageRegistryImpl.java:127)
> at
> org.eclipse.emf.ecp.core.util.ECPUtil.getSubClasses(ECPUtil.java:146)
> at
> org.eclipse.emf.ecp.view.editor.controls.DomainModelReferenceControlSWTRenderer$SelectionAdapterExtension.widgetSelected(DomainModelReferenceControlSWTRenderer.java:325)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4188)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4031)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3658)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
> Caused by: java.lang.ClassCastException:
> org.eclipse.emf.ecore.xcore.impl.XPackageImpl cannot be cast to
> org.eclipse.emf.ecore.EPackage
> at
> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescriptor$Dynamic.getEPackage(RegistryReader.java:246)
> ... 33 more
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02917 seconds