void (@NotNull final XExpression expression, final XModificationCallback callback, final DebuggerContextImpl debuggerContext, final SetValueRunnable setValueRunnable) { final ProgressWindow progressWindow = new ProgressWindow(true, debuggerContext.getProject()); final EvaluationContextImpl evaluationContext = myJavaValue.getEvaluationContext(); SuspendContextCommandImpl askSetAction = new DebuggerContextCommandImpl(debuggerContext) { @Override public Priority getPriority() { return Priority.HIGH; } @Override public void threadAction(@NotNull SuspendContextImpl suspendContext) { ExpressionEvaluator evaluator; try { evaluator = tryDirectAssignment(expression, setValueRunnable.getLType(), evaluationContext); if (evaluator == null) { Project project = evaluationContext.getProject(); SourcePosition position = ContextUtil.getSourcePosition(evaluationContext); PsiElement context = ContextUtil.getContextElement(evaluationContext, position); evaluator = DebuggerInvocationUtil.commitAndRunReadAction(project, new EvaluatingComputable<>() { @Override public ExpressionEvaluator compute() throws EvaluateException { return EvaluatorBuilderImpl .build(TextWithImportsImpl.fromXExpression(expression), context, position, project); } }); } setValue(evaluator, evaluationContext, new SetValueRunnable() { @Override public void setValue(EvaluationContextImpl evaluationContext, Value newValue) throws ClassNotLoadedException, InvalidTypeException, EvaluateException, IncompatibleThreadStateException { if (!progressWindow.isCanceled()) { setValueRunnable.setValue(evaluationContext, newValue); //node.calcValue(); } } @Nullable @Override public Type getLType() throws EvaluateException, ClassNotLoadedException { return setValueRunnable.getLType(); } }); callback.valueModified(); } catch (EvaluateException | ClassNotLoadedException e) { callback.errorOccurred(e.getMessage()); } } }; progressWindow.setTitle(JavaDebuggerBundle.message("title.evaluating")); evaluationContext.getDebugProcess().getManagerThread().startProgress(askSetAction, progressWindow); }