]> gerrit.simantics Code Review - simantics/platform.git/commit - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/TestCommandSession.java
(refs #6878) validateOnly flag to ExpressionEvaluator and CommandSession 15/515/4
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Fri, 12 May 2017 10:58:22 +0000 (13:58 +0300)
committerHannu Niemistö <hannu.niemisto@semantum.fi>
Fri, 12 May 2017 13:57:45 +0000 (16:57 +0300)
commitbea2a8313dd7408716eda5d4e46bba53ef523d54
tree40e8a791886986ad6935bde366eb89f052610e42
parentfede738f59eeae3156c0f2f1df4dd9e99f28b3b1
(refs #6878) validateOnly flag to ExpressionEvaluator and CommandSession

Added a new flag validateOnly to ExpressionEvaluator and CommandSession.
This prevents the execution of the expression. In command session,
variable types are however updated, so it is possible to run longer
command sequences and check their types. To use the flag, run the script
in CommandSession with static method validate.

Change-Id: I3fbb5501c8a902f2f3ea547d5c5bc7d693df3a77
bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/commands/CommandSession.java
bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ExpressionEvaluator.java
bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/SCLExpressionCompilationException.java
tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/TestCommandSession.java