From b1a2b864f05459e37eb66ca9a587df78dc6c889b Mon Sep 17 00:00:00 2001 From: lehtonen Date: Fri, 9 Mar 2012 03:07:40 +0000 Subject: [PATCH] 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 --- .../sysdyn/ui/elements2/connections/DependencyEdgeFactory.java | 2 +- .../sysdyn/ui/elements2/connections/FlowEdgeFactoryOld.java | 2 +- .../sysdyn/ui/elements2/connections/RouteFlowEdgeFactory.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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); } } -- 2.47.1