]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document.server/src/org/simantics/document/server/request/ServerSCLHandlerValueRequest.java
Some enhancements made by Antti for multiple readers
[simantics/platform.git] / bundles / org.simantics.document.server / src / org / simantics / document / server / request / ServerSCLHandlerValueRequest.java
index 67d4d7a44cf10694dc3e0e653043e4969dd733a4..af6d1f6a22e1f1bb0b8f4cd3cc3c59d415724cad 100644 (file)
@@ -82,8 +82,9 @@ public class ServerSCLHandlerValueRequest extends AbstractExpressionCompilationR
                        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 componentType = parent.getType(graph); 
+               Resource root = graph.syncRequest(new IndexRoot(parent.getRepresents(graph)));
+               return Pair.make(componentType, root);
        }
 
     public static List<TCon> getEffects(ReadGraph graph, Variable context) throws DatabaseException {
@@ -251,8 +252,9 @@ public class ServerSCLHandlerValueRequest extends AbstractExpressionCompilationR
                                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));
+                               return Pair.make(componentType, root);
                        }
                }
                throw new IllegalStateException();