X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FProxyVariables.java;h=cd38064a89be00e83c4cf085ad8e83eaa2102c4b;hp=ddfe108cb713a409f1da67df7e688748bdb94606;hb=5c67a96d34fe904b8c4b0375cd08ff1d543bf369;hpb=9a37dabc6c0212ed3e14499c88df3208cd06f9b0 diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ProxyVariables.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ProxyVariables.java index ddfe108cb..cd38064a8 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ProxyVariables.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ProxyVariables.java @@ -52,25 +52,9 @@ public class ProxyVariables { } public static Variable proxySessionVariable(ReadGraph graph, Variable variable) throws DatabaseException { - - try { - - Variable child = variable.getParent(graph); - Variable parent = child.getParent(graph); - if(parent instanceof ProxyChildVariable) { - Variable var = ((ProxyChildVariable)parent).other(); - if(var.getParent(graph) == null) { - return null; - } - return var; - } else { - Variable input = parent.getPossiblePropertyValue(graph, "session"); - if(input == null) { - System.out.println("null input for: " + parent.getURI(graph)); - } - return input; - } + try { + return proxyVariableInput(graph, variable); } catch (Throwable t) { LOGGER.error("proxySessionVariable failed", t); return null; @@ -109,7 +93,7 @@ public class ProxyVariables { } else { Variable parent = variable.getParent(graph); if(parent == null) return null; - else return proxyVariableBase(graph, parent); + else return proxyVariableInput(graph, parent); } }