Refactoring: no need in DebugProcessImpl.ResumeCommand for getting command action
(cherry picked from commit 5638f31)
This commit is contained in:
committed by
Nikolay Krasko
parent
7ba0436d7f
commit
25051746d1
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.idea.debugger.stepping;
|
||||
import com.intellij.debugger.engine.DebugProcessImpl;
|
||||
import com.intellij.debugger.engine.SuspendContextImpl;
|
||||
import com.intellij.debugger.engine.evaluation.EvaluateException;
|
||||
import com.intellij.debugger.engine.events.SuspendContextCommandImpl;
|
||||
import com.intellij.debugger.impl.DebuggerUtilsEx;
|
||||
import com.intellij.debugger.jdi.StackFrameProxyImpl;
|
||||
import com.intellij.debugger.jdi.ThreadReferenceProxyImpl;
|
||||
@@ -37,6 +38,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.psi.KtFunctionLiteral;
|
||||
import org.jetbrains.kotlin.psi.KtNamedFunction;
|
||||
import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -61,7 +63,7 @@ public class DebuggerSteppingHelper {
|
||||
kotlinSourcePosition
|
||||
);
|
||||
|
||||
DebugProcessImpl.ResumeCommand command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints);
|
||||
SuspendContextCommandImpl command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints);
|
||||
|
||||
if (command != null) {
|
||||
createStepRequest(
|
||||
@@ -78,6 +80,9 @@ public class DebuggerSteppingHelper {
|
||||
}
|
||||
catch (EvaluateException ignored) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw ExceptionUtilsKt.rethrow(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -102,7 +107,7 @@ public class DebuggerSteppingHelper {
|
||||
inlineArgument
|
||||
);
|
||||
|
||||
DebugProcessImpl.ResumeCommand command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints);
|
||||
SuspendContextCommandImpl command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints);
|
||||
|
||||
if (command != null) {
|
||||
createStepRequest(
|
||||
@@ -120,6 +125,9 @@ public class DebuggerSteppingHelper {
|
||||
catch (EvaluateException ignored) {
|
||||
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw ExceptionUtilsKt.rethrow(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@ import com.intellij.debugger.NoDataException
|
||||
import com.intellij.debugger.SourcePosition
|
||||
import com.intellij.debugger.engine.DebugProcessImpl
|
||||
import com.intellij.debugger.engine.SuspendContextImpl
|
||||
import com.intellij.debugger.engine.events.SuspendContextCommandImpl
|
||||
import com.intellij.debugger.impl.DebuggerContextImpl
|
||||
import com.intellij.debugger.impl.JvmSteppingCommandProvider
|
||||
import com.intellij.psi.PsiElement
|
||||
@@ -331,7 +332,7 @@ sealed class Action(val position: XSourcePositionImpl?) {
|
||||
debugProcess: DebugProcessImpl,
|
||||
suspendContext: SuspendContextImpl,
|
||||
ignoreBreakpoints: Boolean
|
||||
): DebugProcessImpl.ResumeCommand? {
|
||||
): SuspendContextCommandImpl? {
|
||||
return when (this) {
|
||||
is Action.RUN_TO_CURSOR -> {
|
||||
runReadAction {
|
||||
|
||||
Reference in New Issue
Block a user