summaryrefslogtreecommitdiff
path: root/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-09-04 20:44:00 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-04 20:44:01 +0000
commitfb5a02906f644d044eb0286bf27d413ba0e05216 (patch)
treebca7d49005d81d10c70bc3f547df041c636b4300 /java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java
parent9cde0e3c015174898df8b8f3672185941fad4786 (diff)
parentd245f58efbfc26b13b9b9d5e52e6a83a0d76216c (diff)
downloadidea-fb5a02906f644d044eb0286bf27d413ba0e05216.tar.gz
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
Diffstat (limited to 'java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java')
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java
index e09c17c979e5..1f880513cacd 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java
@@ -28,6 +28,7 @@ import com.intellij.debugger.impl.DebuggerUtilsEx;
import com.intellij.debugger.impl.PositionUtil;
import com.intellij.debugger.jdi.StackFrameProxyImpl;
import com.intellij.openapi.project.Project;
+import com.intellij.openapi.util.registry.Registry;
import com.intellij.psi.PsiCodeFragment;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiExpression;
@@ -80,14 +81,20 @@ public abstract class EvaluationDescriptor extends ValueDescriptorImpl{
try {
final EvaluationContextImpl thisEvaluationContext = getEvaluationContext(evaluationContext);
- final ExpressionEvaluator evaluator = DebuggerInvocationUtil.commitAndRunReadAction(myProject, new EvaluatingComputable<ExpressionEvaluator>() {
- public ExpressionEvaluator compute() throws EvaluateException {
- final PsiElement psiContext = PositionUtil.getContextElement(evaluationContext);
- return getEffectiveCodeFragmentFactory(psiContext).getEvaluatorBuilder().build(getEvaluationCode(thisEvaluationContext),
- ContextUtil.getSourcePosition(thisEvaluationContext));
- }
- });
-
+ final ExpressionEvaluator evaluator;
+ if (Registry.is("debugger.compiling.evaluator")) {
+ evaluator = new CompilingEvaluator(getEvaluationText());
+ }
+ else {
+ evaluator = DebuggerInvocationUtil.commitAndRunReadAction(myProject, new EvaluatingComputable<ExpressionEvaluator>() {
+ public ExpressionEvaluator compute() throws EvaluateException {
+ final PsiElement psiContext = PositionUtil.getContextElement(evaluationContext);
+ return getEffectiveCodeFragmentFactory(psiContext).getEvaluatorBuilder().build(getEvaluationCode(thisEvaluationContext),
+ ContextUtil
+ .getSourcePosition(thisEvaluationContext));
+ }
+ });
+ }
if (!thisEvaluationContext.getDebugProcess().isAttached()) {
throw EvaluateExceptionUtil.PROCESS_EXITED;