X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.structural2%2Fsrc%2Forg%2Fsimantics%2Fstructural2%2FStructuralRVIResolver.java;fp=bundles%2Forg.simantics.structural2%2Fsrc%2Forg%2Fsimantics%2Fstructural2%2FStructuralRVIResolver.java;h=672edfca65c4bfc6995654fdd6b935e4cdb886e4;hp=8cf61b3e0ade8e4dc74ed2e44ca334d655a6ee0c;hb=321607bdbd3ca800128d40b5511092f71cb66367;hpb=e18cdb01663e3ebdae25e66bf158348bbf823a07 diff --git a/bundles/org.simantics.structural2/src/org/simantics/structural2/StructuralRVIResolver.java b/bundles/org.simantics.structural2/src/org/simantics/structural2/StructuralRVIResolver.java index 8cf61b3e0..672edfca6 100644 --- a/bundles/org.simantics.structural2/src/org/simantics/structural2/StructuralRVIResolver.java +++ b/bundles/org.simantics.structural2/src/org/simantics/structural2/StructuralRVIResolver.java @@ -127,16 +127,20 @@ public class StructuralRVIResolver extends StandardRVIResolver { @Override protected Variable resolveChild(ReadGraph graph, Variable variable, Resource resource) throws DatabaseException { Collection path = getRVIPath(graph, variable, resource); - if(path == null) throw new MissingVariableException("Didn't find a variable related to " + resource + ".", resource); - for(Resource r : path) variable = variable.browse(graph, r); + if (path == null) + throw new MissingVariableException("Didn't find a variable related to " + resource + ".", resource); + for (Resource r : path) + variable = variable.browse(graph, r); return variable; } - + @Override protected Variable resolveChild(ReadGraph graph, Variable variable, GuidRVIPart part) throws DatabaseException { Collection path = getRVIPath(graph, variable, part); - if(path == null) throw new MissingVariableException("Didn't find a variable related to " + part + "."); - for(Resource r : path) variable = variable.browse(graph, r); + if (path == null) + throw new MissingVariableException("Didn't find a variable related to " + part + ".", variable.getPossibleRepresents(graph)); + for (Resource r : path) + variable = variable.browse(graph, r); return variable; }