mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[rd debugger] New splitted InterruptThreadAction based on XDebuggerTree (RPC)
IJPL-199588 GitOrigin-RevId: a9219adad73166727304b1179a5b2ad1159ba16d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
314bc94f0f
commit
e1f6355aab
+9
-1
@@ -2,6 +2,7 @@
|
||||
package com.intellij.java.debugger.impl.backend
|
||||
|
||||
import com.intellij.debugger.actions.FreezeThreadAction
|
||||
import com.intellij.debugger.actions.InterruptThreadAction
|
||||
import com.intellij.debugger.actions.ThreadDumpAction
|
||||
import com.intellij.debugger.engine.AsyncStacksUtils
|
||||
import com.intellij.debugger.engine.JavaDebugProcess
|
||||
@@ -71,6 +72,10 @@ internal class BackendJavaDebuggerSessionApi : JavaDebuggerSessionApi {
|
||||
invokeThreadCommand(executionStackId, ThreadCommand.FREEZE)
|
||||
}
|
||||
|
||||
override suspend fun interruptThread(executionStackId: XExecutionStackId) {
|
||||
invokeThreadCommand(executionStackId, ThreadCommand.INTERRUPT)
|
||||
}
|
||||
|
||||
private fun invokeThreadCommand(executionStackId: XExecutionStackId, command: ThreadCommand) {
|
||||
val executionStackModel = executionStackId.findValue() ?: return
|
||||
val xSession = executionStackModel.session
|
||||
@@ -90,11 +95,14 @@ internal class BackendJavaDebuggerSessionApi : JavaDebuggerSessionApi {
|
||||
ThreadCommand.FREEZE -> {
|
||||
FreezeThreadAction.freezeThread(threadProxy, debugProcess, managerThread)
|
||||
}
|
||||
ThreadCommand.INTERRUPT -> {
|
||||
InterruptThreadAction.interruptThread(threadProxy, debugProcess, managerThread)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private enum class ThreadCommand { FREEZE, RESUME }
|
||||
private enum class ThreadCommand { FREEZE, RESUME, INTERRUPT }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user