From e03f9cfaaaed5f3d4978fe5c80e7540f90e7bb47 Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Fri, 16 Nov 2018 15:10:40 +0200 Subject: [PATCH] Minor refactoring in Simulator Toolkit gitlab #205 Change-Id: Id0f513093b83eb2cdcf4a087daca1edbc57b0363 --- .../toolkit/db/StandardVariableNodeManager.java | 9 --------- .../simantics/simulator/toolkit/StandardNodeManager.java | 6 +++--- .../org/simantics/simulator/toolkit/StandardRealm.java | 8 ++++++++ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/bundles/org.simantics.simulator.toolkit.db/src/org/simantics/simulator/toolkit/db/StandardVariableNodeManager.java b/bundles/org.simantics.simulator.toolkit.db/src/org/simantics/simulator/toolkit/db/StandardVariableNodeManager.java index 883f8099f..a08d733d1 100644 --- a/bundles/org.simantics.simulator.toolkit.db/src/org/simantics/simulator/toolkit/db/StandardVariableNodeManager.java +++ b/bundles/org.simantics.simulator.toolkit.db/src/org/simantics/simulator/toolkit/db/StandardVariableNodeManager.java @@ -31,15 +31,6 @@ public class StandardVariableNodeManager(this); } -/* public void registerNodeSupport(NodeSupport support) { - this.support = support; - } - - - public void registerSupport(NodeSupport support) { - this.support = support; - }*/ - @Override public void refreshVariable(Node node) { super.refreshVariable(node); diff --git a/bundles/org.simantics.simulator.toolkit/src/org/simantics/simulator/toolkit/StandardNodeManager.java b/bundles/org.simantics.simulator.toolkit/src/org/simantics/simulator/toolkit/StandardNodeManager.java index b8a549087..402f3884d 100644 --- a/bundles/org.simantics.simulator.toolkit/src/org/simantics/simulator/toolkit/StandardNodeManager.java +++ b/bundles/org.simantics.simulator.toolkit/src/org/simantics/simulator/toolkit/StandardNodeManager.java @@ -51,8 +51,8 @@ public class StandardNodeManager realm; + protected final Node root; + protected final StandardRealm realm; static final Binding NO_BINDING = new VariantBinding() { @@ -116,7 +116,7 @@ public class StandardNodeManager valueCache = new THashMap<>(); + protected THashMap valueCache = new THashMap<>(); protected THashMap> listeners = new THashMap<>(); AtomicBoolean fireNodeListenersScheduled = new AtomicBoolean(false); diff --git a/bundles/org.simantics.simulator.toolkit/src/org/simantics/simulator/toolkit/StandardRealm.java b/bundles/org.simantics.simulator.toolkit/src/org/simantics/simulator/toolkit/StandardRealm.java index 8551222b2..343957166 100644 --- a/bundles/org.simantics.simulator.toolkit/src/org/simantics/simulator/toolkit/StandardRealm.java +++ b/bundles/org.simantics.simulator.toolkit/src/org/simantics/simulator/toolkit/StandardRealm.java @@ -28,6 +28,7 @@ abstract public class StandardRealm nodeManager; + private boolean disposed = false; private Runnable scheduleSyncExec = new Runnable() { @Override @@ -178,6 +179,13 @@ abstract public class StandardRealm getNodeManager() { -- 2.47.1