]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Please install the new graph compiler, QueryControl should be used in resource-file...
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 21 Dec 2011 09:52:30 +0000 (09:52 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 21 Dec 2011 09:52:30 +0000 (09:52 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@23659 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.jfreechart.ontology/src/org/simantics/sysdyn/JFreeChartResource.java
org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java

index 78a96672b30816327e5eab9dcdf9e0df7e3bef7f..51e5d54c9f221aab1416635221b2e26998dfe23c 100644 (file)
@@ -5,6 +5,7 @@ import org.simantics.db.ReadGraph;
 import org.simantics.db.request.Read;\r
 import org.simantics.db.Session;\r
 import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.service.QueryControl;\r
 \r
 public class JFreeChartResource {\r
     \r
@@ -319,7 +320,8 @@ public class JFreeChartResource {
         Session session = graph.getSession();\r
         JFreeChartResource ret = session.peekService(JFreeChartResource.class);\r
         if(ret == null) {\r
-            ret = new JFreeChartResource(graph);\r
+            QueryControl qc = graph.getService(QueryControl.class);\r
+            ret = new JFreeChartResource(qc.getIndependentGraph(graph));\r
             session.registerService(JFreeChartResource.class, ret);\r
         }\r
         return ret;\r
@@ -330,7 +332,8 @@ public class JFreeChartResource {
         if(ret == null) {\r
             ret = session.syncRequest(new Read<JFreeChartResource>() {\r
                 public JFreeChartResource perform(ReadGraph graph) throws DatabaseException {\r
-                    return new JFreeChartResource(graph);\r
+                    QueryControl qc = graph.getService(QueryControl.class);\r
+                    return new JFreeChartResource(qc.getIndependentGraph(graph));\r
                 }\r
             });\r
             session.registerService(JFreeChartResource.class, ret);\r
index 6ea72e254b8a29fd3dbb853bf377059461330f24..dda9fead0c740270971641933aa5b45e6a1c4f00 100644 (file)
@@ -5,6 +5,7 @@ import org.simantics.db.ReadGraph;
 import org.simantics.db.request.Read;\r
 import org.simantics.db.Session;\r
 import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.service.QueryControl;\r
 \r
 public class SysdynResource {\r
     \r
@@ -874,7 +875,8 @@ public class SysdynResource {
         Session session = graph.getSession();\r
         SysdynResource ret = session.peekService(SysdynResource.class);\r
         if(ret == null) {\r
-            ret = new SysdynResource(graph);\r
+            QueryControl qc = graph.getService(QueryControl.class);\r
+            ret = new SysdynResource(qc.getIndependentGraph(graph));\r
             session.registerService(SysdynResource.class, ret);\r
         }\r
         return ret;\r
@@ -885,7 +887,8 @@ public class SysdynResource {
         if(ret == null) {\r
             ret = session.syncRequest(new Read<SysdynResource>() {\r
                 public SysdynResource perform(ReadGraph graph) throws DatabaseException {\r
-                    return new SysdynResource(graph);\r
+                    QueryControl qc = graph.getService(QueryControl.class);\r
+                    return new SysdynResource(qc.getIndependentGraph(graph));\r
                 }\r
             });\r
             session.registerService(SysdynResource.class, ret);\r