]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.document.server / src / org / simantics / document / server / Functions.java
index 186edd25247fa9e67aa506404600cf18fb785ed6..8dea97ad118da8235b185d56b0e0ce539d9d7f0a 100644 (file)
@@ -164,8 +164,8 @@ public class Functions {
                         StandardAssertedGraphPropertyVariable ass = (StandardAssertedGraphPropertyVariable)property;
                         if("dataDefinitions".equals(ass.property.name) || "commands".equals(ass.property.name)  || "pollingFunction".equals(ass.property.name)) {
                                storePropertyValueAndExceptions(graph, parent, ass.property.name, property, map);
+                            continue;
                         }
-                        continue;
                     }
                     Resource predicate = property.getPossiblePredicateResource(graph);
                     if(predicate != null) {
@@ -297,8 +297,8 @@ public class Functions {
                         StandardAssertedGraphPropertyVariable ass = (StandardAssertedGraphPropertyVariable)property;
                         if("dataDefinitions".equals(ass.property.name) || "commands".equals(ass.property.name)  || "pollingFunction".equals(ass.property.name)) {
                             result.add(ass.property.name);
+                            continue;
                         }
-                        continue;
                     }
                     Resource predicate = property.getPossiblePredicateResource(graph);
                     if(predicate != null) {
@@ -1381,6 +1381,15 @@ public class Functions {
         }
     }
     
+    public static String compileDocumentSCLHandlerValueExpression(ReadGraph graph, Variable context) {
+        try {
+            ServerSCLHandlerValueRequest.compile(graph, context);
+            return "";
+        } catch (Exception e) {
+            return resolveIssueMessage(e);
+        }
+    }
+
     private static String resolveIssueMessage(Exception e) {
         if (e instanceof ImportFailureException)
             return "";