XInstanceEvaluator () { return new XInstanceEvaluator() { @Override public void evaluate(@NotNull final XDebuggerEvaluator.XEvaluationCallback callback, @NotNull final XStackFrame frame) { myEvaluationContext.getManagerThread().schedule(new DebuggerCommandImpl() { @Override protected void commandCancelled() { callback.errorOccurred(JavaDebuggerBundle.message("error.context.has.changed")); } @Override protected void action() { ValueDescriptorImpl inspectDescriptor = myValueDescriptor; if (myValueDescriptor instanceof WatchItemDescriptor) { Modifier modifier = ((WatchItemDescriptor)myValueDescriptor).getModifier(); if (modifier != null) { NodeDescriptor item = modifier.getInspectItem(getProject()); if (item != null) { inspectDescriptor = (ValueDescriptorImpl)item; } } } EvaluationContextImpl evaluationContext = ((JavaStackFrame)frame).getFrameDebuggerContext(null).createEvaluationContext(); if (evaluationContext != null) { callback.evaluated(create(inspectDescriptor, evaluationContext, myNodeManager)); } else { callback.errorOccurred(JavaDebuggerBundle.message("error.context.not.available")); } } }); } }; }