package org.simantics.spreadsheet.graph; import java.io.Serializable; import org.simantics.spreadsheet.graph.synchronization.SheetLineComponent; 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 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 createComponentFactory() { return new ComponentFactory() { @Override public SheetLineComponent create(String uid) { return new SheetLineComponent(uid); } }; } }