import org.simantics.spreadsheet.solver.SpreadsheetCellContentExpression;
import org.simantics.spreadsheet.solver.SpreadsheetCellEditable;
import org.simantics.spreadsheet.solver.SpreadsheetFormula;
+import org.simantics.spreadsheet.solver.SpreadsheetSCLConstant;
import org.simantics.spreadsheet.solver.SpreadsheetTypeNode;
import org.simantics.structural.stubs.StructuralResource2;
public SpreadsheetNodeManager(SpreadsheetRealm realm) {
super(realm, realm.getEngine());
+ new Exception().printStackTrace();
realm.getEngine().registerListener(new SpreadsheetBookListener() {
@Override
@Override
public void run() {
for(SpreadsheetCell cell : cells) {
- System.err.println("Modification in cell " + cell);
+ System.err.println("Modification in cell " + cell.getName());
refreshVariable(new SpreadsheetCellContent(cell));
- refreshVariable(new SpreadsheetCellContentExpression(cell));
+ Object content = cell.getContent();
+ if(content instanceof SpreadsheetFormula || content instanceof SpreadsheetSCLConstant)
+ refreshVariable(new SpreadsheetCellContentExpression(cell));
}
}
});