]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/Layer0Utils.java
StructuralUtils.isImmutable now takes L0.readOnly of input into account
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / Layer0Utils.java
index 830f7a6bb74776ece6a99b35eb3b9b51999cc10a..ad8676f813bdb83d4da1adde8aed547c31541ddb 100644 (file)
@@ -1202,6 +1202,10 @@ public class Layer0Utils {
 
     }
 
+    public static boolean isMarkedReadOnly(ReadGraph graph, Resource r) throws DatabaseException {
+        return Boolean.TRUE.equals( graph.getPossibleRelatedValue(r, graph.<Layer0>l0().readOnly, Bindings.BOOLEAN) );
+    }
+
     private static TransferableGraph1 makeTG(ReadGraph graph, Resource r) throws DatabaseException {
 
        SimanticsClipboardImpl cp = new SimanticsClipboardImpl();