Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
script interpreter gracefully handling null result (#3832)
Browse files Browse the repository at this point in the history
fixes #3831
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
  • Loading branch information
sjsf authored and kaikreuzer committed Jul 11, 2017
1 parent b7474f0 commit cb7b0ad
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -23,6 +23,7 @@ import org.eclipse.xtext.xbase.interpreter.IEvaluationContext
import org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter
import org.eclipse.xtext.xbase.jvmmodel.IJvmModelAssociations
import org.eclipse.xtext.common.types.JvmIdentifiableElement
import org.eclipse.xtext.xbase.XExpression

/**
* The script interpreter handles ESH specific script components, which are not known
Expand Down Expand Up @@ -111,5 +112,12 @@ public class ScriptInterpreter extends XbaseInterpreter {
super._assignValueTo(jvmField, assignment, value, context, indicator)
}
}

override protected doEvaluate(XExpression expression, IEvaluationContext context, CancelIndicator indicator) {
if (expression == null) {
return null
}
return super.doEvaluate(expression, context, indicator)
}

}

0 comments on commit cb7b0ad

Please sign in to comment.