1 package org.simantics.simulator.toolkit;
3 import org.simantics.databoard.binding.Binding;
4 import org.simantics.simulation.sequences.action.AbstractActionContext;
5 import org.simantics.simulator.IDynamicExperimentLocal;
6 import org.slf4j.Logger;
7 import org.slf4j.LoggerFactory;
9 public class DynamicExperimentActionContext extends AbstractActionContext {
11 private static final Logger LOGGER = LoggerFactory.getLogger(DynamicExperimentActionContext.class);
13 final private IDynamicExperimentLocal experiment;
15 public DynamicExperimentActionContext(IDynamicExperimentLocal experiment) {
16 this.experiment = experiment;
20 public Object get(String variableName, Binding binding) {
21 return experiment.getVariableValueById(variableName);
25 public void set(String variableName, Object value, Binding binding) {
26 experiment.setVariableValueById(variableName, value, binding);