--- /dev/null
+package org.simantics.spreadsheet.solver;
+
+import java.io.Serializable;
+
+import org.simantics.structural.synchronization.utils.ComponentFactory;
+import org.simantics.structural.synchronization.utils.MappingBase;
+import org.simantics.structural.synchronization.utils.Solver;
+import org.simantics.structural.synchronization.utils.StateUndoContextBase;
+
+public class SpreadsheetMapping extends MappingBase<SheetLineComponent> implements Serializable {
+
+ private static final long serialVersionUID = -7556699663877911393L;
+
+ final SheetLineComponent configuration;
+
+ public SpreadsheetMapping(SheetLineComponent configuration) {
+ super(configuration, true);
+ this.configuration = configuration;
+ }
+
+ @Override
+ public SheetLineComponent getConfiguration() {
+ return configuration;
+ }
+
+ @Override
+ public StateUndoContextBase createUndoContext() {
+ return new StateUndoContextBase() {
+
+ @Override
+ public void saveState(Solver solver, int componentId, String uid) {
+ }
+
+ @Override
+ public boolean loadState(Solver solver, int componentId, String uid) {
+ return false;
+ }
+ };
+ }
+
+ @Override
+ public ComponentFactory<SheetLineComponent> createComponentFactory() {
+ return new ComponentFactory<SheetLineComponent>() {
+
+ @Override
+ public SheetLineComponent create(String uid) {
+ return new SheetLineComponent(uid);
+ }
+
+ };
+ }
+
+}