Inherited `@File` attributes generate compiler errors
Issue
Compiler errors after generating Cinco product:
- 2 MGLs:
GraphA.mgl
andGraphB.mgl
-
GraphA.mgl
definesNodeA
withfile
attribute with@file
annotation -
GraphB.mgl
definesNodeB
which extendsNodeA
- Compiler errors in generated class
test.grapha.editor.graphiti.property.view.GraphAPropertyView
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 #369 (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")
@file
attr EString as file
}
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.grapha.editor.graphiti.property.view.GraphAPropertyView (generated)
public class GraphAPropertyView implements de.jabc.cinco.meta.core.ui.properties.IValuesProposalProvider {
// ...
public static void initEStructuralFeatureInformation(){
// ...
de.jabc.cinco.meta.core.ui.properties.CincoPropertyView.init_FileAttributes(new org.eclipse.emf.ecore.EStructuralFeature[] {
test.graphb.graphb.internal.InternalPackage.eINSTANCE.getInternalNodeB_File(), // Compiler error (see below)
test.grapha.grapha.internal.InternalPackage.eINSTANCE.getInternalNodeA_File()
});
de.jabc.cinco.meta.core.ui.properties.CincoPropertyView.init_FileAttributesExtensionFilters(
test.grapha.grapha.internal.InternalPackage.eINSTANCE.getInternalNodeB_File(), // Compiler error (see below)
new String[] {""}
);
// ...
}
// ...
}
Compiler error:
The method getInternalNodeB_File() is undefined for the type InternalPackage
Edited by Fabian