Refactoring: make createCommand non-nullable
(cherry picked from commit 67cc9b5)
This commit is contained in:
committed by
Nikolay Krasko
parent
f7813263ee
commit
78525ed7c6
@@ -65,15 +65,13 @@ public class DebuggerSteppingHelper {
|
||||
|
||||
SuspendContextCommandImpl command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints);
|
||||
|
||||
if (command != null) {
|
||||
createStepRequest(
|
||||
suspendContext, getContextThread(),
|
||||
debugProcess.getVirtualMachineProxy().eventRequestManager(),
|
||||
StepRequest.STEP_LINE, StepRequest.STEP_OUT);
|
||||
createStepRequest(
|
||||
suspendContext, getContextThread(),
|
||||
debugProcess.getVirtualMachineProxy().eventRequestManager(),
|
||||
StepRequest.STEP_LINE, StepRequest.STEP_OUT);
|
||||
|
||||
command.contextAction();
|
||||
return;
|
||||
}
|
||||
command.contextAction();
|
||||
return;
|
||||
}
|
||||
|
||||
debugProcess.createStepOutCommand(suspendContext).contextAction();
|
||||
@@ -108,16 +106,13 @@ public class DebuggerSteppingHelper {
|
||||
);
|
||||
|
||||
SuspendContextCommandImpl command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints);
|
||||
createStepRequest(
|
||||
suspendContext, getContextThread(),
|
||||
debugProcess.getVirtualMachineProxy().eventRequestManager(),
|
||||
StepRequest.STEP_LINE, StepRequest.STEP_OUT);
|
||||
|
||||
if (command != null) {
|
||||
createStepRequest(
|
||||
suspendContext, getContextThread(),
|
||||
debugProcess.getVirtualMachineProxy().eventRequestManager(),
|
||||
StepRequest.STEP_LINE, StepRequest.STEP_OUT);
|
||||
|
||||
command.contextAction();
|
||||
return;
|
||||
}
|
||||
command.contextAction();
|
||||
return;
|
||||
}
|
||||
|
||||
debugProcess.createStepOverCommand(suspendContext, ignoreBreakpoints).contextAction();
|
||||
|
||||
+2
-2
@@ -48,7 +48,7 @@ import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.inline.InlineUtil
|
||||
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||
|
||||
class KotlinSteppingCommandProvider: JvmSteppingCommandProvider() {
|
||||
class KotlinSteppingCommandProvider : JvmSteppingCommandProvider() {
|
||||
override fun getStepOverCommand(
|
||||
suspendContext: SuspendContextImpl?,
|
||||
ignoreBreakpoints: Boolean,
|
||||
@@ -332,7 +332,7 @@ sealed class Action(val position: XSourcePositionImpl?) {
|
||||
debugProcess: DebugProcessImpl,
|
||||
suspendContext: SuspendContextImpl,
|
||||
ignoreBreakpoints: Boolean
|
||||
): SuspendContextCommandImpl? {
|
||||
): SuspendContextCommandImpl {
|
||||
return when (this) {
|
||||
is Action.RUN_TO_CURSOR -> {
|
||||
runReadAction {
|
||||
|
||||
Reference in New Issue
Block a user