Search in sources :

Example 1 with DecompiledLocalVariable

use of com.intellij.debugger.jdi.DecompiledLocalVariable in project intellij-community by JetBrains.

the class ArgumentValueDescriptorImpl method getModifier.

@Override
public XValueModifier getModifier(JavaValue value) {
    return new JavaValueModifier(value) {

        @Override
        protected void setValueImpl(@NotNull String expression, @NotNull XModificationCallback callback) {
            final DecompiledLocalVariable local = ArgumentValueDescriptorImpl.this.getVariable();
            if (local != null) {
                final DebuggerContextImpl debuggerContext = DebuggerManagerEx.getInstanceEx(getProject()).getContext();
                set(expression, callback, debuggerContext, new SetValueRunnable() {

                    public void setValue(EvaluationContextImpl evaluationContext, Value newValue) throws ClassNotLoadedException, InvalidTypeException, EvaluateException {
                        LocalVariablesUtil.setValue(debuggerContext.getFrameProxy().getStackFrame(), local.getSlot(), newValue);
                        update(debuggerContext);
                    }

                    public ReferenceType loadClass(EvaluationContextImpl evaluationContext, String className) throws InvocationException, ClassNotLoadedException, IncompatibleThreadStateException, InvalidTypeException, EvaluateException {
                        return evaluationContext.getDebugProcess().loadClass(evaluationContext, className, evaluationContext.getClassLoader());
                    }
                });
            }
        }
    };
}
Also used : DecompiledLocalVariable(com.intellij.debugger.jdi.DecompiledLocalVariable) NotNull(org.jetbrains.annotations.NotNull) EvaluateException(com.intellij.debugger.engine.evaluation.EvaluateException) JavaValueModifier(com.intellij.debugger.engine.JavaValueModifier) EvaluationContextImpl(com.intellij.debugger.engine.evaluation.EvaluationContextImpl) JavaValue(com.intellij.debugger.engine.JavaValue) DebuggerContextImpl(com.intellij.debugger.impl.DebuggerContextImpl)

Aggregations

JavaValue (com.intellij.debugger.engine.JavaValue)1 JavaValueModifier (com.intellij.debugger.engine.JavaValueModifier)1 EvaluateException (com.intellij.debugger.engine.evaluation.EvaluateException)1 EvaluationContextImpl (com.intellij.debugger.engine.evaluation.EvaluationContextImpl)1 DebuggerContextImpl (com.intellij.debugger.impl.DebuggerContextImpl)1 DecompiledLocalVariable (com.intellij.debugger.jdi.DecompiledLocalVariable)1 NotNull (org.jetbrains.annotations.NotNull)1