void (@NotNull final XExpression expression, @NotNull final XEvaluationCallback callback, @Nullable XSourcePosition expressionPosition) { myDebugProcess.getManagerThread().schedule(new DebuggerContextCommandImpl(myDebugProcess.getDebuggerContext(), myStackFrame.getStackFrameProxy().threadProxy()) { @Override public Priority getPriority() { return Priority.NORMAL; } @Override public void threadAction(@NotNull SuspendContextImpl suspendContext) { try { if (DebuggerUIUtil.isObsolete(callback)) { return; } JavaDebugProcess process = myDebugProcess.getXdebugProcess(); if (process == null) { callback.errorOccurred(JavaDebuggerBundle.message("error.no.debug.process")); return; } TextWithImports text = TextWithImportsImpl.fromXExpression(expression); NodeManagerImpl nodeManager = process.getNodeManager(); WatchItemDescriptor descriptor = nodeManager.getWatchItemDescriptor(null, text, null); EvaluationContextImpl evalContext = myStackFrame.getFrameDebuggerContext(getDebuggerContext()).createEvaluationContext(); if (evalContext == null) { callback.errorOccurred(JavaDebuggerBundle.message("error.context.not.available")); return; } descriptor.setContext(evalContext); EvaluateException exception = descriptor.getEvaluateException(); if (exception != null && descriptor.getValue() == null) { callback.errorOccurred(exception.getMessage()); return; } callback.evaluated(JavaValue.create(null, descriptor, evalContext, nodeManager, true)); } catch (Throwable e) { callback.errorOccurred(JavaDebuggerBundle.message("error.internal")); throw e; } } }); }