]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/ImmutableComponentVariableContentRequest.java
Still working for multiple readers
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / ImmutableComponentVariableContentRequest.java
index ac08c945e11ce52a9d7618ba95f1ed6bc03429e4..cef62c242633e7708131a47a7c92dc0b0148149d 100644 (file)
@@ -12,6 +12,7 @@ import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.layer0.request.PropertyInfo;
 import org.simantics.db.layer0.request.UnescapedPropertyMapOfResource;
 import org.simantics.layer0.Layer0;
+import org.simantics.structural.stubs.StructuralResource2;
 import org.simantics.structural2.ConnectionImpl;
 import org.simantics.structural2.Functions.StructuralChildMapOfResource;
 import org.simantics.structural2.queries.ConnectionPointMapOfResource;
@@ -28,6 +29,11 @@ public class ImmutableComponentVariableContentRequest extends ResourceRead<Immut
                Layer0 L0 = Layer0.getInstance(graph);
                String name = graph.getRelatedValue(resource, L0.HasName, Bindings.STRING);
                ImmutableComponentVariableContent result = new ImmutableComponentVariableContent(resource, name);
+
+               StructuralResource2 STR = StructuralResource2.getInstance(graph);
+               Resource componentType = graph.getPossibleType(resource, STR.Component);
+               if(componentType != null)
+                       result.procedural = graph.isInstanceOf(componentType, STR.ProceduralComponentType); 
                
                Map<String,PropertyInfo> pis = graph.syncRequest(new UnescapedPropertyMapOfResource(resource));