]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/ImmutableComponentVariableBuilder.java
Work in progress
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / ImmutableComponentVariableBuilder.java
index 87a342f13b9fa0284e17e961e66dfb736446a629..6d1388caf374635bd1b5d0e54fd36b83cde835df 100644 (file)
@@ -17,18 +17,10 @@ public class ImmutableComponentVariableBuilder<Node> implements VariableBuilder<
        @Override
        public Variable buildChild(ReadGraph graph, Variable parent, VariableNode<Node> node, Resource child) throws DatabaseException {
                boolean isImmutable = graph.isImmutable(child);
-               Resource possibleIndexRoot = graph.syncRequest(new PossibleIndexRoot(child));
-               if(possibleIndexRoot != null) {
-//                     String puri = graph.getURI(possibleIndexRoot);
-//                     if(puri.contains("ModelBroker")) 
-//                             isImmutable = true;
-//                     if(NameUtils.getSafeName(graph, child).equals("Project"))
-//                             isImmutable = false;
-               }
                if(isImmutable) {
-//                     System.err.println("ImmutableComponentVariableContentRequest " + parent.getURI(graph) + " " + NameUtils.getSafeName(graph, child));
-                       ImmutableComponentVariableContent content = graph.syncRequest(new ImmutableComponentVariableContentRequest(child), TransientCacheListener.instance());
-                       return new ImmutableComponentVariable(parent, content);
+//                     ImmutableComponentVariableContent content = graph.syncRequest(new ImmutableComponentVariableContentRequest(child), TransientCacheListener.instance());
+//                     return new ImmutableComponentVariable(parent, content);
+                       return new StandardGraphChildVariable(parent, node, child);
                } else {
                        return new StandardGraphChildVariable(parent, node, child);
                }