X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.district.selection.ui%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fselection%2Fui%2FElementSelectionTools.java;h=33a428f41e71fddb25a729aed13b5467aa8f2fed;hb=363468682f0e4f48b1e0ab040f6f06005266db35;hp=130e3f4f3550d8e98dc5b9795743dba56a6d867a;hpb=fc5581727a984b57dade7a627ac408ea5ad3f811;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.selection.ui/src/org/simantics/district/selection/ui/ElementSelectionTools.java b/org.simantics.district.selection.ui/src/org/simantics/district/selection/ui/ElementSelectionTools.java index 130e3f4f..33a428f4 100644 --- a/org.simantics.district.selection.ui/src/org/simantics/district/selection/ui/ElementSelectionTools.java +++ b/org.simantics.district.selection.ui/src/org/simantics/district/selection/ui/ElementSelectionTools.java @@ -37,8 +37,9 @@ public class ElementSelectionTools { return (T)element; } else if (contentType instanceof AnyVariable) { + AnyVariable type = (AnyVariable) contentType; try { - return (T) Simantics.getSession().syncRequest(new ResourceRead(element) { + return (T) type.processor.syncRequest(new ResourceRead(element) { public Variable perform(ReadGraph graph) throws DatabaseException { return ElementSelector.getVariableForElement(graph, resource); }