MGL Error when referencing Graphmodel in other model elements
When trying to reference the graphmodel in a model element, e.g. Node:
node SomeNode {
style labeledCircle("${label}")
attr SomeGraphGraphModel as myContainer[1,1]
attr EString as label
incomingEdges (*)
outgoingEdges (*)
}
The Generation of the Gratext language will result in the following Exception:
1059 [main] ERROR xt.generator.XtextGeneratorLanguage - [TransformationDiagnostic: null:21 Cannot find compatible feature myContainer in sealed EClass GratextInternalSomeNode from imported package http://cinco.scce.info/product/somegraph/mglid/somegraphgraphmodel/gratext: The existing reference 'myContainer' has an incompatible type 'SomeGraphGraphModel' [info.scce.cinco.product.somegraph.mglid.somegraph.SomeGraphGraphModel]. The expected type is 'GratextInternalSomeGraphGraphModel' [info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext.GratextInternalSomeGraphGraphModel]. (ErrorCode: CannotCreateTypeInSealedMetamodel)]
1063 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher - Problems running workflow info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext: Problem parsing 'file:<redacted>/runtime-CincoWithFeatures.product12/info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext/../info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext/src/info/scce/cinco/product/somegraph/mglid/somegraphgraphmodel/gratext/SomeGraphGratext.xtext':
TransformationDiagnostic: null:21 Cannot find compatible feature myContainer in sealed EClass GratextInternalSomeNode from imported package http://cinco.scce.info/product/somegraph/mglid/somegraphgraphmodel/gratext: The existing reference 'myContainer' has an incompatible type 'SomeGraphGraphModel' [info.scce.cinco.product.somegraph.mglid.somegraph.SomeGraphGraphModel]. The expected type is 'GratextInternalSomeGraphGraphModel' [info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext.GratextInternalSomeGraphGraphModel]. (ErrorCode: CannotCreateTypeInSealedMetamodel)
java.lang.RuntimeException: Problems running workflow info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext: Problem parsing 'file:/<redacted>/runtime-CincoWithFeatures.product12/info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext/../info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext/src/info/scce/cinco/product/somegraph/mglid/somegraphgraphmodel/gratext/SomeGraphGratext.xtext':
TransformationDiagnostic: null:21 Cannot find compatible feature myContainer in sealed EClass GratextInternalSomeNode from imported package http://cinco.scce.info/product/somegraph/mglid/somegraphgraphmodel/gratext: The existing reference 'myContainer' has an incompatible type 'SomeGraphGraphModel' [info.scce.cinco.product.somegraph.mglid.somegraph.SomeGraphGraphModel]. The expected type is 'GratextInternalSomeGraphGraphModel' [info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext.GratextInternalSomeGraphGraphModel]. (ErrorCode: CannotCreateTypeInSealedMetamodel)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:105)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:63)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:53)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:79)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:37)
Caused by: java.lang.IllegalStateException: Problem parsing 'file:<redacted>/runtime-CincoWithFeatures.product12/info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext/../info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext/src/info/scce/cinco/product/somegraph/mglid/somegraphgraphmodel/gratext/SomeGraphGratext.xtext':
TransformationDiagnostic: null:21 Cannot find compatible feature myContainer in sealed EClass GratextInternalSomeNode from imported package http://cinco.scce.info/product/somegraph/mglid/somegraphgraphmodel/gratext: The existing reference 'myContainer' has an incompatible type 'SomeGraphGraphModel' [info.scce.cinco.product.somegraph.mglid.somegraph.SomeGraphGraphModel]. The expected type is 'GratextInternalSomeGraphGraphModel' [info.scce.cinco.product.somegraph.mglid.somegraphgraphmodel.gratext.GratextInternalSomeGraphGraphModel]. (ErrorCode: CannotCreateTypeInSealedMetamodel)
at org.eclipse.xtext.xtext.generator.XtextGeneratorLanguage.initialize(XtextGeneratorLanguage.java:276)
at org.eclipse.xtext.xtext.generator.StandardLanguage.initialize(StandardLanguage.java:184)
at org.eclipse.xtext.xtext.generator.XtextGenerator.initialize(XtextGenerator.java:186)
at org.eclipse.xtext.xtext.generator.XtextGenerator.checkConfigurationInternal(XtextGenerator.java:140)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:23)
at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.preInvoke(Mwe2Bridge.java:69)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.preInvoke(AbstractWorkflowComponent.java:208)
at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.preInvoke(AbstractCompositeWorkflowComponent.java:31)
at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:20)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:103)
... 4 more
Edited by Michael Lybecait