DependencyGraph computes false cycles
When an MGL and also this MGL's parent are extended simultaneously the DependencyGraph computation falsely detects an cyclic dependency.
The example below leads to a generation abort without any prompt, but the following exception thrown in the layer above:
Caused by: de.jabc.cinco.meta.core.ui.utils.DirectedGraph$GraphContainsCyclesException
at de.jabc.cinco.meta.core.ui.utils.DirectedGraph.getTopSortedNodes(DirectedGraph.java:495)
at de.jabc.cinco.meta.core.ui.utils.DirectedGraph.getTopSortedContents(DirectedGraph.java:520)
at de.jabc.cinco.meta.core.ui.handlers.CincoProductGenerationHandler.calculateMGLSets(CincoProductGenerationHandler.java:555)
at de.jabc.cinco.meta.core.ui.handlers.CincoProductGenerationHandler.execute(CincoProductGenerationHandler.java:155)
[...]
Example:
SomeGraph.mgl
id info.scce.cinco.product.somegraph.mglid
stylePath "model/SomeGraph.style"
graphModel SomeGraphGraphModel {
diagramExtension "somegraph"
containableElements(SomeNode)
}
node SomeNode {
style labeledCircle("${label}")
incomingEdges (*)
outgoingEdges (*)
attr EString as label
}
edge Transition {
style simpleArrow
}
OtherGraph.mgl
import "model/SomeGraph.mgl" as SomeGraph
id info.scce.cinco.product.somegraph.othergraph
stylePath "model/SomeGraph.style"
graphModel OtherGraphGraphModel extends SomeGraph::SomeGraphGraphModel {
diagramExtension "othergraph"
containableElements(OtherNode)
}
node OtherNode {
style labeledCircle("${label}")
incomingEdges (*)
outgoingEdges (*)
attr EString as label
}
edge OtherTransition {
style simpleArrow
}
ThirdGraph.mgl
import "model/SomeGraph.mgl" as SomeGraph
import "model/OtherGraph.mgl" as OtherGraph
id info.scce.cinco.product.somegraph.thirdgraph
stylePath "model/SomeGraph.style"
graphModel ThirdGraphGraphModel extends OtherGraph::OtherGraphGraphModel {
diagramExtension "thirdgraph"
containableElements(ThirdNode)
}
node ThirdNode extends SomeGraph::SomeNode {
style labeledCircle("${label}")
incomingEdges (*)
outgoingEdges (*)
attr EString as labelThird
}
edge ThirdTransition {
style simpleArrow
}
ExampleTool.cpd
cincoProduct SomeGraphTool {
mgl "model/SomeGraph.mgl"
mgl "model/OtherGraph.mgl"
mgl "model/ThirdGraph.mgl"
}