Pass graphs as ReadGraph instead of Object for clarity 92/3192/1
authorJussi Koskela <jussi.koskela@semantum.fi>
Wed, 4 Sep 2019 05:40:57 +0000 (08:40 +0300)
committerJussi Koskela <jussi.koskela@semantum.fi>
Wed, 4 Sep 2019 05:40:57 +0000 (08:40 +0300)
gitlab #321

Change-Id: Id061b4d16f95a403a861e3cc06f1980c1a1dab60

bundles/org.simantics.scl.db/src/org/simantics/scl/db/SCLFunctions.java

index d8f83e05f5b2f231bc5dcd14bf27bf93ff85ffdc..2fd74b21e3e1c25e7b7b520ba24f559ff0749a06 100644 (file)
@@ -151,7 +151,7 @@ public class SCLFunctions {
         }
     }
     
-    public static <T> T evaluateGraph(String module, String function, Object graph, Object ... args) throws DatabaseException {
+    public static <T> T evaluateGraph(String module, String function, ReadGraph graph, Object ... args) throws DatabaseException {
         final SCLContext context = SCLContext.getCurrent();
         SCLContext.push(context);
         Object oldGraph = context.put(GRAPH, graph);
@@ -163,7 +163,7 @@ public class SCLFunctions {
         }
     }
 
-    public static void runWithGraph(Object graph, Runnable r) {
+    public static void runWithGraph(ReadGraph graph, Runnable r) {
         final SCLContext context = SCLContext.getCurrent();
         SCLContext.push(context);
         Object oldGraph = context.put(GRAPH, graph);