1 package org.simantics.spreadsheet.graph;
3 import org.simantics.spreadsheet.graph.formula.SpreadsheetEvaluationEnvironment;
5 public class EvaluateAll implements SpreadsheetVisitor {
7 final SpreadsheetEvaluationEnvironment env;
9 public EvaluateAll(SpreadsheetBook book) {
10 this.env = SpreadsheetEvaluationEnvironment.getInstance(book);
14 public void visit(SpreadsheetBook book) {
15 for(SpreadsheetEngine engine : book.sheets) engine.accept(this);
19 public void visit(SpreadsheetEngine engine) {
20 engine.lines.accept(this);
24 public void visit(SpreadsheetLines node) {
25 for(SpreadsheetLines child : node.nodes.values()) child.accept(this);
26 for(SpreadsheetLine line : node.lines.values()) line.accept(this);
30 public void visit(SpreadsheetLine line) {
31 for(SpreadsheetCell cell : line.cells) cell.accept(this);
35 public void visit(SpreadsheetCell cell) {
37 cell.evaluate(env, null);
38 } catch (Throwable t) {