Inherited `@ color` attributes generate compiler errors
Issue
Compiler errors after generating Cinco product:
- 2 MGLs:
GraphA.mgl
andGraphB.mgl
-
GraphA.mgl
definesNodeA
withcolor
attribute with@color
annotation -
GraphB.mgl
definesNodeB
which extendsNodeA
- Compiler errors in generated class
test.graphb.editor.graphiti.property.view.GraphBPropertyView
Observation
- The issue only occurs, if the two nodes originate from different MGL files
- If the two nodes are defined in the same MGL, the compiler errors do not occur
- Might be related to issue #368 (closed) (note the different
GraphXPropertyView
classes)
Example
GraphA.mgl
id test.grapha
stylePath "model/Test.style"
graphModel GraphA {
diagramExtension "grapha"
containableElements (*)
}
node NodeA {
style labeledCircle("A")
@color(rgb)
attr EString as color
}
GraphB.mgl
import "model/GraphA.mgl" as a
id test.graphb
stylePath "model/Test.style"
graphModel GraphB {
diagramExtension "graphb"
containableElements (*)
}
node NodeB extends a::NodeA {
style labeledCircle("B")
}
test.graphb.editor.graphiti.property.view.GraphBPropertyView (generated)
public class GraphBPropertyView implements de.jabc.cinco.meta.core.ui.properties.IValuesProposalProvider {
// ...
public static void initEStructuralFeatureInformation(){
// ...
de.jabc.cinco.meta.core.ui.properties.CincoPropertyView.init_ColorAttributes(new org.eclipse.emf.ecore.EStructuralFeature[] {
test.graphb.graphb.internal.InternalPackage.eINSTANCE.getInternalNodeA_Color() // Compiler error (see below)
});
// ...
}
// ...
}
Compiler error:
The method getInternalNodeA_Color() is undefined for the type InternalPackage
Edited by Fabian