String href = domainDiagramElement.getAttribute("href");
// trim to last /
href = href.substring(href.lastIndexOf("/") + 1);
EClass rootElement = resolveSimpleEClass(href);
rootElements.add(new RootElementPair(rootElement, modelID, filename));
}
});
// and then check all gmfgens that these root elements are coorect
iterate(new DefaultIterator() {
@Override
public void execute2(String filename, Document doc) throws Exception {
// will do both links and nodes
IterableElementList nodes = xpath(doc, "/GenEditorGenerator/diagram/topLevelNodes");
nodes.addAll(xpath(doc, "/GenEditorGenerator/diagram/links"));
assertFalse(filename + ": No nodes found", nodes.isEmpty());
boolean changed = false;
for (Element node : nodes) {
// find the meta element for this node
Element meta = xpathFirst(node, "modelFacet/metaClass");
// iaml.genmodel#//model/CompositeOperation
String metaHref = meta.getAttribute("href");
// CompositeOperation
metaHref = metaHref.substring(metaHref.lastIndexOf("/") + 1);
EClass metaElement = resolveSimpleEClass(metaHref);
try {
RootElementPair pair = getBestPair(rootElements, metaElement);
if (pair == null)