From: Antti Villberg Date: Wed, 23 Jan 2019 10:34:33 +0000 (+0200) Subject: Bugfixing sheets X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=e76829647764a2873224849a40532db6bdef6bdc Bugfixing sheets Change-Id: I43f7781e858643409d26903e1ecb79198a6c77c2 --- diff --git a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetGraphUtils.java b/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetGraphUtils.java index ee57745ae..51f292929 100644 --- a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetGraphUtils.java +++ b/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetGraphUtils.java @@ -551,6 +551,7 @@ public class SpreadsheetGraphUtils { Variable contextVariable = Variables.getVariable(graph, parameter); Variable configVariable = Variables.getVariable(graph, parameter2); Variable activeVariable = Variables.switchPossibleContext(graph, configVariable, contextVariable.getRepresents(graph)); + if(activeVariable == null) return Variant.ofInstance("Could not resolve " + configVariable.getURI(graph) + " for " + contextVariable.getURI(graph)); return activeVariable.getVariantValue(graph); } }, new Listener() { @@ -562,7 +563,7 @@ public class SpreadsheetGraphUtils { @Override public void exception(Throwable t) { - LOGGER.error("Error while evaluating variable value", t); + LOGGER.error("Error while evaluating variable value, context = " + context + " uri=" + uri, t); } @Override diff --git a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetNodeManager.java b/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetNodeManager.java index 70ddf56ba..a7bee9d4b 100644 --- a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetNodeManager.java +++ b/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetNodeManager.java @@ -21,6 +21,7 @@ import org.simantics.spreadsheet.solver.SpreadsheetCellContent; 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; @@ -29,6 +30,7 @@ public class SpreadsheetNodeManager extends StandardVariableNodeManager