[MWE2] Problem loading models [message #1221385] |
Tue, 17 December 2013 15:21 |
|
Hello,
I'm trying to use MWE2 to run a transformation workflow which is simple enough: load a .gmfgen model and generate code from an Xtend template.
For the first step, I'm using the provided "Reader" component:
Workflow {
component = org.eclipse.emf.mwe.utils.Reader {
uri = "/org.eclipse.papyrus/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen"
modelSlot = "inputGmfgen"
}
}
When running this simple wf, I get:
Quote:
Couldn't load resource under /org.eclipse.papyrus/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen : org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/gmf/2009/GenModel' not found.
Fair enough. I then add a preceding custom-written component to load the GMFGen EPackage. Its implementation only does this:
public class LoadGmfgenComponent extends AbstractWorkflowComponent {
protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
EPackage.Registry.INSTANCE.put(GMFGenPackage.eNS_URI, GMFGenPackage.eINSTANCE);
}
...
}
The workflow now looks like this:
Workflow {
//0. Load GMFGen
component = org.eclipse.papyrus.test.framework.m2t.xtend.LoadGmfgenComponent {}
//1. Load GMFGen file
component = org.eclipse.emf.mwe.utils.Reader {
uri = "/org.eclipse.papyrus/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen"
modelSlot = "inputGmfgen"
}
}
And now I get:
Quote:
Missing serialized package: /models/gmfgen.ecore
at org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl.loadPackage(GMFGenPackageImpl.java:7694)
at org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl.initGen(GMFGenPackageImpl.java:1238)
at org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl.init(GMFGenPackageImpl.java:1254)
...which is a first since calling GMFGenPackage.eINSTANCE from any platfom-running code would not throw this. I haved added the dependency containing this package (org.eclipse.gmf.codegen), and it doesn't change anything.
Thus, I can't load my input model to my MWE2 workflow. Any ideas?
Thanks a lot in advance for the help!
Juan
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01744 seconds