`attr` & `containableElement` with the same name causes erroneous product generation
Description
Having an attr
and containableElement
with the same name (although one is singular, the other plural) is not forbidden in the MGL and does not raise any errors or warning.
When actually generating the CINCO product, code generation fails.
Minimal, reproducible example (MRE):
@style("model/SomeGraph.style")
graphModel SomeGraph {
package info.scce.cinco.product.somegraph
nsURI "http://cinco.scce.info/product/somegraph"
diagramExtension "somegraph"
containableElements (Variable [0, *])
attr CiVariable as variables [0, *]
type CiVariable {
attr EString as name
attr EString as value
}
@style(labeledCircle, "${value}")
node Variable {
attr EString as value
}
}
Errors in project after generation:
/model/info/scce/cinco/product/somegraph/gratext/SomeGraphGratext.ecore
:
A containment reference of a type with a container feature org.eclipse.emf.ecore.impl.EReferenceImpl@20e324be{http://www.jabc.de/cinco/gdl/graphmodel#//internal/InternalType/element} that requires instances to be contained elsewhere cannot be populated/src-gen/info/scce/cinco/product/somegraph/somegraph/SomegraphPackage.java
(2x):
Duplicate field SomegraphPackage.Literals.SOME_GRAPH___GET_VARIABLES/src-gen/model/SomeGraph.ecore
:
There may not be two operations 'org.eclipse.emf.ecore.impl.EOperationImpl@5b61c4a9{platform:/resource/info.scce.cinco.product.somegraph/src-gen/model/SomeGraph.ecore#//SomeGraph/getVariables}' and 'org.eclipse.emf.ecore.impl.EOperationImpl@53a5c158{platform:/resource/info.scce.cinco.product.somegraph/src-gen/model/SomeGraph.ecore#//SomeGraph/getVariables.1}' with the same signature
Expected behavior
Warning / error message in the MGL
Version
Cinco 1.1.0