From: lehtonen Date: Fri, 9 Mar 2012 03:07:40 +0000 (+0000) Subject: Attempts at lowering diagram and especially g2d ElementClass memory consumption by... X-Git-Tag: simantics-1.6~28 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=b1a2b864f05459e37eb66ca9a587df78dc6c889b;p=simantics%2Fsysdyn.git Attempts at lowering diagram and especially g2d ElementClass memory consumption by caching ElementClass request results. There are still plenty of equals/hashCode problems in the ElementClass instances constructed by different ElementFactory implementations. refs #3275 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@24388 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/DependencyEdgeFactory.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/DependencyEdgeFactory.java index 998bbc42..1e8aabb7 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/DependencyEdgeFactory.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/DependencyEdgeFactory.java @@ -37,7 +37,7 @@ public class DependencyEdgeFactory extends ElementFactoryAdapter { @Override public void getClass(AsyncReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementResource, AsyncProcedure procedure) { - throw new UnsupportedOperationException(); + procedure.execute(graph, CLASS); } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/FlowEdgeFactoryOld.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/FlowEdgeFactoryOld.java index ae6eee98..71e2c066 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/FlowEdgeFactoryOld.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/FlowEdgeFactoryOld.java @@ -37,7 +37,7 @@ public class FlowEdgeFactoryOld extends ElementFactoryAdapter { @Override public void getClass(AsyncReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementResource, AsyncProcedure procedure) { - throw new UnsupportedOperationException(); + procedure.execute(graph, CLASS); } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/RouteFlowEdgeFactory.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/RouteFlowEdgeFactory.java index 8ee7934b..838c2d06 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/RouteFlowEdgeFactory.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/RouteFlowEdgeFactory.java @@ -32,7 +32,7 @@ public class RouteFlowEdgeFactory extends ElementFactoryAdapter { @Override public void getClass(AsyncReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementResource, AsyncProcedure procedure) { - throw new UnsupportedOperationException(); + procedure.execute(graph, CLASS); } }