From: lehtonen Date: Wed, 21 Dec 2011 09:52:30 +0000 (+0000) Subject: Please install the new graph compiler, QueryControl should be used in resource-file... X-Git-Tag: simantics-1.6~64 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=92c8545bd3dede9d5191ba1999e693018ee38ada;p=simantics%2Fsysdyn.git Please install the new graph compiler, QueryControl should be used in resource-file initialization. git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@23659 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.jfreechart.ontology/src/org/simantics/sysdyn/JFreeChartResource.java b/org.simantics.jfreechart.ontology/src/org/simantics/sysdyn/JFreeChartResource.java index 78a96672..51e5d54c 100644 --- a/org.simantics.jfreechart.ontology/src/org/simantics/sysdyn/JFreeChartResource.java +++ b/org.simantics.jfreechart.ontology/src/org/simantics/sysdyn/JFreeChartResource.java @@ -5,6 +5,7 @@ import org.simantics.db.ReadGraph; import org.simantics.db.request.Read; import org.simantics.db.Session; import org.simantics.db.exception.DatabaseException; +import org.simantics.db.service.QueryControl; public class JFreeChartResource { @@ -319,7 +320,8 @@ public class JFreeChartResource { Session session = graph.getSession(); JFreeChartResource ret = session.peekService(JFreeChartResource.class); if(ret == null) { - ret = new JFreeChartResource(graph); + QueryControl qc = graph.getService(QueryControl.class); + ret = new JFreeChartResource(qc.getIndependentGraph(graph)); session.registerService(JFreeChartResource.class, ret); } return ret; @@ -330,7 +332,8 @@ public class JFreeChartResource { if(ret == null) { ret = session.syncRequest(new Read() { public JFreeChartResource perform(ReadGraph graph) throws DatabaseException { - return new JFreeChartResource(graph); + QueryControl qc = graph.getService(QueryControl.class); + return new JFreeChartResource(qc.getIndependentGraph(graph)); } }); session.registerService(JFreeChartResource.class, ret); diff --git a/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java b/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java index 6ea72e25..dda9fead 100644 --- a/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java +++ b/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java @@ -5,6 +5,7 @@ import org.simantics.db.ReadGraph; import org.simantics.db.request.Read; import org.simantics.db.Session; import org.simantics.db.exception.DatabaseException; +import org.simantics.db.service.QueryControl; public class SysdynResource { @@ -874,7 +875,8 @@ public class SysdynResource { Session session = graph.getSession(); SysdynResource ret = session.peekService(SysdynResource.class); if(ret == null) { - ret = new SysdynResource(graph); + QueryControl qc = graph.getService(QueryControl.class); + ret = new SysdynResource(qc.getIndependentGraph(graph)); session.registerService(SysdynResource.class, ret); } return ret; @@ -885,7 +887,8 @@ public class SysdynResource { if(ret == null) { ret = session.syncRequest(new Read() { public SysdynResource perform(ReadGraph graph) throws DatabaseException { - return new SysdynResource(graph); + QueryControl qc = graph.getService(QueryControl.class); + return new SysdynResource(qc.getIndependentGraph(graph)); } }); session.registerService(SysdynResource.class, ret);