import org.simantics.databoard.binding.mutable.Variant;
import org.simantics.db.layer0.variable.Variables.NodeStructure;
import org.simantics.simulator.variable.NodeManager;
+import org.simantics.simulator.variable.exceptions.NoValueException;
+import org.simantics.simulator.variable.exceptions.NodeManagerException;
/**
* @author Antti Villberg
&& manager.equals(other.manager);
}
+ public void refreshCache(Node node) throws NodeManagerException {
+ VariableNode<Node> variableNode = new VariableNode<>(this, node);
+ NodeStructure ns = NodeStructureRequest.get(variableNode);
+ structureCache.put(node, ns);
+ try {
+ Variant value = manager.getValue(node);
+ valueCache.put(node, value);
+ } catch (NoValueException e) {
+ valueCache.remove(node);
+ };
+ }
+
public void dispose() {
valueCache.dispose();
structureCache.dispose();