Layer0Utils.addL0Identifier to prevent possible differentiation of code
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / ModelingUtils.java
index 8a5b92228a74f52dd5e4bf41665bf09a0567c88b..753a90292926f6221d002ba187ce51a3bfcd82d7 100644 (file)
@@ -2260,7 +2260,7 @@ public class ModelingUtils {
                Layer0 L0 = Layer0.getInstance(graph);
                while(!todo.isEmpty()) {
                        Resource resource = todo.remove(todo.size()-1);
-            graph.claimLiteral(resource, L0.identifier, L0.GUID, GUID.random(), GUID.BINDING);
+                       Layer0Utils.addL0Identifier(graph, resource);
             if(deep)
                todo.addAll(graph.getObjects(resource, L0.ConsistsOf));
                }
@@ -2291,7 +2291,7 @@ public class ModelingUtils {
                                
                                GUID existing = graph.getPossibleRelatedValue(r, L0.identifier, GUID.BINDING);
                                if(existing == null) {
-                                       graph.addLiteral(r, L0.identifier, L0.identifier_Inverse, L0.GUID, GUID.random(), GUID.BINDING);
+                                   Layer0Utils.addL0Identifier(graph, r);
                                        madeChanges = true;
                                }