]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.simulator.toolkit/src/org/simantics/simulator/toolkit/StandardNodeManager.java
Remove unnecessary System.out print from DynamicExperimentThread
[simantics/platform.git] / bundles / org.simantics.simulator.toolkit / src / org / simantics / simulator / toolkit / StandardNodeManager.java
index 8f1d1cf53c9c2a0c29ce8a6fbefd499128646df7..8a51fd330764959e7c62f4cc292c2ab2e36fb0c0 100644 (file)
@@ -322,6 +322,23 @@ public abstract class StandardNodeManager<Node, Engine extends StandardNodeManag
     @Override
     public void setValue(Node node, Object value, Binding binding)
             throws NodeManagerException {
+       updateValueInner(node, value, binding);
+        refreshVariable(node);
+    }
+
+    //Update the value of the node and remove from valueCache only the references nodes
+    public void setValueAndFireSelectedListeners(Node node, Object value, Binding binding, Set<Node> references) throws NodeManagerException {
+       if(references.size() > 0) {
+               for(Node n : references) {
+                       valueCache.remove(n);
+               }
+       }
+       updateValueInner(node, value, binding);
+       fireNodeListenersSync();
+    }
+    
+    //Update the value of the node helper method
+    private void updateValueInner(Node node, Object value, Binding binding) throws NodeManagerException {
         checkThreadAccess();
         Binding targetBinding = realm.getEngine().getEngineBinding(node);
         if(binding.equals(targetBinding)) {
@@ -341,7 +358,6 @@ public abstract class StandardNodeManager<Node, Engine extends StandardNodeManag
                 throw new NodeManagerException(e);
             }
         }
-        refreshVariable(node);
     }
 
     @Override