+ for (Resource r : currentSelection) {
+ // No connections
+ if (graph.isInstanceOf(r, DIA.Connection))
+ continue;
+ if (!graph.isInstanceOf(r, DIA.Element)) {
+ if (!graph.hasStatement(r, MOD.ComponentToElement))
+ continue;
+
+ r = graph.getPossibleObject(r, MOD.ComponentToElement);
+ if (r == null)
+ continue;
+ }
+
+ graph.claim(generator, ES.Generator_HasSelectedElement, r);
+ }