X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.document.server%2Fsrc%2Forg%2Fsimantics%2Fdocument%2Fserver%2Frequest%2FServerSCLValueRequest.java;h=9655e0f86d96e074b7d9a9fa9027343209736667;hb=46c8189fee24a71d1ce0634e12db5a696e952b10;hp=77cd9b4f4a3a8cfe175b27c40508819dc3cfa880;hpb=378f6f82ce88c8ba2ba9f7345cb25679b508bae5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.document.server/src/org/simantics/document/server/request/ServerSCLValueRequest.java b/bundles/org.simantics.document.server/src/org/simantics/document/server/request/ServerSCLValueRequest.java index 77cd9b4f4..9655e0f86 100644 --- a/bundles/org.simantics.document.server/src/org/simantics/document/server/request/ServerSCLValueRequest.java +++ b/bundles/org.simantics.document.server/src/org/simantics/document/server/request/ServerSCLValueRequest.java @@ -80,6 +80,7 @@ public class ServerSCLValueRequest extends AbstractExpressionCompilationRequest< Resource type = graph.syncRequest(new FindPossibleComponentTypeRequest(represents)); if(type != null) { Resource root = graph.syncRequest(new IndexRoot(type)); + //System.err.println("getComponentTypeAndRoot1 " + property.getURI(graph) + " => " + graph.getPossibleURI(type) + " " + graph.getPossibleURI(root)); return Pair.make(type, root); } } @@ -87,8 +88,11 @@ public class ServerSCLValueRequest extends AbstractExpressionCompilationRequest< parent = parent.getParent(graph); represents = parent.getPossibleRepresents(graph); } - Resource root = graph.syncRequest(new IndexRoot(property.getRepresents(graph))); - return Pair.make(parent.getType(graph), root); +// Resource root = graph.syncRequest(new IndexRoot(property.getRepresents(graph))); + Resource componentType = parent.getType(graph); + Resource root = graph.syncRequest(new IndexRoot(parent.getRepresents(graph))); + //System.err.println("getComponentTypeAndRoot2 " + property.getURI(graph) + " => " + graph.getPossibleURI(componentType) + " " + graph.getPossibleURI(root)); + return Pair.make(componentType, root); } private static Pair getComponentTypeAndRoot(ReadGraph graph, Resource component) throws DatabaseException { @@ -96,11 +100,14 @@ public class ServerSCLValueRequest extends AbstractExpressionCompilationRequest< Resource type = graph.syncRequest(new FindPossibleComponentTypeRequest(component)); if(type != null) { Resource root = graph.syncRequest(new IndexRoot(type)); + // System.err.println("getComponentTypeAndRoot3 " + graph.getPossibleURI(component) + " => " + graph.getPossibleURI(type) + " " + graph.getPossibleURI(root)); return Pair.make(type, root); } else { Resource doc = graph.syncRequest(new PossibleTypedParent(component, DocumentationResource.getInstance(graph).Document)); - Resource root = graph.syncRequest(new IndexRoot(component)); - return Pair.make(graph.getSingleType(doc), root); + Resource componentType = graph.getSingleType(doc); + Resource root = graph.syncRequest(new IndexRoot(doc)); + // System.err.println("getComponentTypeAndRoot4 " + graph.getPossibleURI(component) + " => " + graph.getPossibleURI(componentType) + " " + graph.getPossibleURI(root)); + return Pair.make(componentType, root); } } throw new IllegalStateException();