coroutine debugger logic moved to jvm-debugger-coroutine module
This commit is contained in:
committed by
Vladimir Ilmov
parent
b1b0817336
commit
e570450c59
@@ -75,6 +75,7 @@ dependencies {
|
|||||||
compile(project(":idea:jvm-debugger:jvm-debugger-core"))
|
compile(project(":idea:jvm-debugger:jvm-debugger-core"))
|
||||||
compile(project(":idea:jvm-debugger:jvm-debugger-evaluation"))
|
compile(project(":idea:jvm-debugger:jvm-debugger-evaluation"))
|
||||||
compile(project(":idea:jvm-debugger:jvm-debugger-sequence"))
|
compile(project(":idea:jvm-debugger:jvm-debugger-sequence"))
|
||||||
|
compile(project(":idea:jvm-debugger:jvm-debugger-coroutine"))
|
||||||
compile(project(":j2k"))
|
compile(project(":j2k"))
|
||||||
compile(project(":idea:idea-j2k"))
|
compile(project(":idea:idea-j2k"))
|
||||||
compile(project(":idea:formatter"))
|
compile(project(":idea:formatter"))
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
id("jps-compatible")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile(project(":idea:jvm-debugger:jvm-debugger-core"))
|
||||||
|
|
||||||
|
compileOnly(intellijDep())
|
||||||
|
|
||||||
|
Platform[192].orHigher {
|
||||||
|
compileOnly(intellijPluginDep("java"))
|
||||||
|
}
|
||||||
|
|
||||||
|
testCompile(project(":kotlin-test:kotlin-test-junit"))
|
||||||
|
testCompile(commonDep("junit:junit"))
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
"main" { projectDefault() }
|
||||||
|
"test" { none() }
|
||||||
|
}
|
||||||
+3
-3
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines
|
package org.jetbrains.kotlin.idea.debugger.coroutine
|
||||||
|
|
||||||
import com.intellij.debugger.engine.*
|
import com.intellij.debugger.engine.*
|
||||||
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
|
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
|
||||||
@@ -11,8 +11,8 @@ import com.intellij.debugger.jdi.StackFrameProxyImpl
|
|||||||
import com.intellij.xdebugger.frame.XSuspendContext
|
import com.intellij.xdebugger.frame.XSuspendContext
|
||||||
import com.sun.jdi.*
|
import com.sun.jdi.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.*
|
import org.jetbrains.kotlin.idea.debugger.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineAsyncStackFrameItem
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineAsyncStackFrameItem
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.AsyncStackTraceContext
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.AsyncStackTraceContext
|
||||||
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
||||||
|
|
||||||
class CoroutineAsyncStackTraceProvider : AsyncStackTraceProvider {
|
class CoroutineAsyncStackTraceProvider : AsyncStackTraceProvider {
|
||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines
|
package org.jetbrains.kotlin.idea.debugger.coroutine
|
||||||
|
|
||||||
import com.intellij.execution.RunConfigurationExtension
|
import com.intellij.execution.RunConfigurationExtension
|
||||||
import com.intellij.execution.configurations.DebuggingRunnerData
|
import com.intellij.execution.configurations.DebuggingRunnerData
|
||||||
@@ -14,7 +14,7 @@ import com.intellij.execution.configurations.RunnerSettings
|
|||||||
* Installs coroutines debug agent and coroutines tab if `kotlinx-coroutines-debug` dependency is found
|
* Installs coroutines debug agent and coroutines tab if `kotlinx-coroutines-debug` dependency is found
|
||||||
*/
|
*/
|
||||||
@Suppress("IncompatibleAPI")
|
@Suppress("IncompatibleAPI")
|
||||||
class CoroutinesDebugConfigurationExtension : RunConfigurationExtension() {
|
class CoroutineDebugConfigurationExtension : RunConfigurationExtension() {
|
||||||
|
|
||||||
override fun isApplicableFor(configuration: RunConfigurationBase<*>) = coroutineDebuggerEnabled()
|
override fun isApplicableFor(configuration: RunConfigurationBase<*>) = coroutineDebuggerEnabled()
|
||||||
|
|
||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines
|
package org.jetbrains.kotlin.idea.debugger.coroutine
|
||||||
|
|
||||||
import com.intellij.execution.RunConfigurationExtension
|
import com.intellij.execution.RunConfigurationExtension
|
||||||
import com.intellij.execution.configurations.DebuggingRunnerData
|
import com.intellij.execution.configurations.DebuggingRunnerData
|
||||||
@@ -14,7 +14,7 @@ import com.intellij.execution.configurations.RunnerSettings
|
|||||||
* Installs coroutines debug agent and coroutines tab if `kotlinx-coroutines-debug` dependency is found
|
* Installs coroutines debug agent and coroutines tab if `kotlinx-coroutines-debug` dependency is found
|
||||||
*/
|
*/
|
||||||
@Suppress("IncompatibleAPI")
|
@Suppress("IncompatibleAPI")
|
||||||
class CoroutinesDebugConfigurationExtension : RunConfigurationExtension() {
|
class CoroutineDebugConfigurationExtension : RunConfigurationExtension() {
|
||||||
|
|
||||||
override fun isApplicableFor(configuration: RunConfigurationBase<*>) = coroutineDebuggerEnabled()
|
override fun isApplicableFor(configuration: RunConfigurationBase<*>) = coroutineDebuggerEnabled()
|
||||||
|
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines
|
package org.jetbrains.kotlin.idea.debugger.coroutine
|
||||||
|
|
||||||
import org.jetbrains.annotations.NonNls
|
import org.jetbrains.annotations.NonNls
|
||||||
|
|
||||||
+4
-4
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines
|
package org.jetbrains.kotlin.idea.debugger.coroutine
|
||||||
|
|
||||||
import com.intellij.debugger.DebuggerInvocationUtil
|
import com.intellij.debugger.DebuggerInvocationUtil
|
||||||
import com.intellij.debugger.actions.ThreadDumpAction
|
import com.intellij.debugger.actions.ThreadDumpAction
|
||||||
@@ -31,9 +31,9 @@ import com.intellij.util.messages.MessageBusConnection
|
|||||||
import com.intellij.xdebugger.*
|
import com.intellij.xdebugger.*
|
||||||
import com.intellij.xdebugger.impl.XDebugSessionImpl
|
import com.intellij.xdebugger.impl.XDebugSessionImpl
|
||||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.util.*
|
import org.jetbrains.kotlin.idea.debugger.coroutine.util.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.view.CoroutinesPanel
|
import org.jetbrains.kotlin.idea.debugger.coroutine.view.CoroutinesPanel
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.view.XCoroutineView
|
import org.jetbrains.kotlin.idea.debugger.coroutine.view.XCoroutineView
|
||||||
import java.util.concurrent.atomic.AtomicInteger
|
import java.util.concurrent.atomic.AtomicInteger
|
||||||
import kotlin.properties.ReadOnlyProperty
|
import kotlin.properties.ReadOnlyProperty
|
||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.command
|
package org.jetbrains.kotlin.idea.debugger.coroutine.command
|
||||||
|
|
||||||
import com.intellij.debugger.DebuggerInvocationUtil
|
import com.intellij.debugger.DebuggerInvocationUtil
|
||||||
import com.intellij.debugger.engine.events.DebuggerContextCommandImpl
|
import com.intellij.debugger.engine.events.DebuggerContextCommandImpl
|
||||||
+3
-3
@@ -3,13 +3,13 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.command
|
package org.jetbrains.kotlin.idea.debugger.coroutine.command
|
||||||
|
|
||||||
import com.intellij.debugger.impl.DebuggerContextImpl
|
import com.intellij.debugger.impl.DebuggerContextImpl
|
||||||
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl
|
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl
|
||||||
import com.intellij.debugger.ui.impl.watch.NodeManagerImpl
|
import com.intellij.debugger.ui.impl.watch.NodeManagerImpl
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CreationFramesDescriptor
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CreationFramesDescriptor
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineCreatedStackFrameDescriptor
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineCreatedStackFrameDescriptor
|
||||||
|
|
||||||
@Deprecated("moved to XCoroutineView")
|
@Deprecated("moved to XCoroutineView")
|
||||||
class CoroutineBuildCreationFrameCommand(
|
class CoroutineBuildCreationFrameCommand(
|
||||||
+3
-3
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.command
|
package org.jetbrains.kotlin.idea.debugger.coroutine.command
|
||||||
|
|
||||||
import com.intellij.debugger.engine.DebugProcessImpl
|
import com.intellij.debugger.engine.DebugProcessImpl
|
||||||
import com.intellij.debugger.engine.JavaStackFrame
|
import com.intellij.debugger.engine.JavaStackFrame
|
||||||
@@ -14,8 +14,8 @@ import com.intellij.debugger.jdi.StackFrameProxyImpl
|
|||||||
import com.intellij.debugger.jdi.ThreadReferenceProxyImpl
|
import com.intellij.debugger.jdi.ThreadReferenceProxyImpl
|
||||||
import com.intellij.debugger.memory.utils.StackFrameItem
|
import com.intellij.debugger.memory.utils.StackFrameItem
|
||||||
import com.intellij.debugger.ui.impl.watch.*
|
import com.intellij.debugger.ui.impl.watch.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.CoroutineAsyncStackTraceProvider
|
import org.jetbrains.kotlin.idea.debugger.coroutine.CoroutineAsyncStackTraceProvider
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.*
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.*
|
||||||
|
|
||||||
@Deprecated("Moved to XCoroutineView")
|
@Deprecated("Moved to XCoroutineView")
|
||||||
class CoroutineBuildFrameCommand(
|
class CoroutineBuildFrameCommand(
|
||||||
+8
-8
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.command
|
package org.jetbrains.kotlin.idea.debugger.coroutine.command
|
||||||
|
|
||||||
import com.intellij.debugger.DebuggerManagerEx
|
import com.intellij.debugger.DebuggerManagerEx
|
||||||
import com.intellij.debugger.engine.*
|
import com.intellij.debugger.engine.*
|
||||||
@@ -22,13 +22,13 @@ import com.intellij.xdebugger.frame.XStackFrame
|
|||||||
import com.intellij.xdebugger.frame.XSuspendContext
|
import com.intellij.xdebugger.frame.XSuspendContext
|
||||||
import com.sun.jdi.*
|
import com.sun.jdi.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.*
|
import org.jetbrains.kotlin.idea.debugger.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.CoroutineAsyncStackTraceProvider
|
import org.jetbrains.kotlin.idea.debugger.coroutine.CoroutineAsyncStackTraceProvider
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineInfoData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineInfoData
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.SuspendStackFrameDescriptor
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.SuspendStackFrameDescriptor
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.SyntheticStackFrame
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.SyntheticStackFrame
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.AsyncStackTraceContext
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.AsyncStackTraceContext
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.util.EmptyStackFrameDescriptor
|
import org.jetbrains.kotlin.idea.debugger.coroutine.util.EmptyStackFrameDescriptor
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.util.logger
|
import org.jetbrains.kotlin.idea.debugger.coroutine.util.logger
|
||||||
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
||||||
|
|
||||||
|
|
||||||
+6
-7
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.command
|
package org.jetbrains.kotlin.idea.debugger.coroutine.command
|
||||||
|
|
||||||
import com.intellij.debugger.DebuggerManagerEx
|
import com.intellij.debugger.DebuggerManagerEx
|
||||||
import com.intellij.debugger.engine.events.SuspendContextCommandImpl
|
import com.intellij.debugger.engine.events.SuspendContextCommandImpl
|
||||||
@@ -24,11 +24,10 @@ import com.intellij.psi.search.GlobalSearchScope
|
|||||||
import com.intellij.util.text.DateFormatUtil
|
import com.intellij.util.text.DateFormatUtil
|
||||||
import com.intellij.xdebugger.impl.XDebuggerManagerImpl
|
import com.intellij.xdebugger.impl.XDebuggerManagerImpl
|
||||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.view.CoroutineDumpPanel
|
import org.jetbrains.kotlin.idea.debugger.coroutine.view.CoroutineDumpPanel
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.coroutineDebuggerEnabled
|
import org.jetbrains.kotlin.idea.debugger.coroutine.coroutineDebuggerEnabled
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineInfoData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineInfoData
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.CoroutinesDebugProbesProxy
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.CoroutineDebugProbesProxy
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.util.logger
|
|
||||||
|
|
||||||
@Suppress("ComponentNotRegistered")
|
@Suppress("ComponentNotRegistered")
|
||||||
class CoroutineDumpAction : AnAction(), AnAction.TransparentUpdate {
|
class CoroutineDumpAction : AnAction(), AnAction.TransparentUpdate {
|
||||||
@@ -41,7 +40,7 @@ class CoroutineDumpAction : AnAction(), AnAction.TransparentUpdate {
|
|||||||
val process = context.debugProcess ?: return
|
val process = context.debugProcess ?: return
|
||||||
process.managerThread.schedule(object : SuspendContextCommandImpl(context.suspendContext) {
|
process.managerThread.schedule(object : SuspendContextCommandImpl(context.suspendContext) {
|
||||||
override fun contextAction() {
|
override fun contextAction() {
|
||||||
val states = CoroutinesDebugProbesProxy(context.suspendContext ?: return)
|
val states = CoroutineDebugProbesProxy(context.suspendContext ?: return)
|
||||||
.dumpCoroutines()
|
.dumpCoroutines()
|
||||||
if (states.isOk()) {
|
if (states.isOk()) {
|
||||||
val message = KotlinBundle.message("debugger.session.tab.coroutine.message.error")
|
val message = KotlinBundle.message("debugger.session.tab.coroutine.message.error")
|
||||||
+7
-7
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.command
|
package org.jetbrains.kotlin.idea.debugger.coroutine.command
|
||||||
|
|
||||||
import com.intellij.debugger.DebuggerInvocationUtil
|
import com.intellij.debugger.DebuggerInvocationUtil
|
||||||
import com.intellij.debugger.engine.SuspendContextImpl
|
import com.intellij.debugger.engine.SuspendContextImpl
|
||||||
@@ -14,11 +14,11 @@ import com.intellij.debugger.impl.DebuggerSession
|
|||||||
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl
|
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl
|
||||||
import com.intellij.debugger.ui.impl.watch.NodeManagerImpl
|
import com.intellij.debugger.ui.impl.watch.NodeManagerImpl
|
||||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineDescriptorData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineDescriptorData
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineInfoData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineInfoData
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.CoroutinesDebugProbesProxy
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.CoroutineDebugProbesProxy
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.util.ProjectNotification
|
import org.jetbrains.kotlin.idea.debugger.coroutine.util.ProjectNotification
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.view.CoroutinesDebuggerTree
|
import org.jetbrains.kotlin.idea.debugger.coroutine.view.CoroutinesDebuggerTree
|
||||||
|
|
||||||
@Deprecated("moved to XCoroutineView")
|
@Deprecated("moved to XCoroutineView")
|
||||||
class RefreshCoroutinesTreeCommand(
|
class RefreshCoroutinesTreeCommand(
|
||||||
@@ -32,7 +32,7 @@ class RefreshCoroutinesTreeCommand(
|
|||||||
val root = nodeManagerImpl.defaultNode
|
val root = nodeManagerImpl.defaultNode
|
||||||
val suspendContext: SuspendContextImpl? = suspendContext
|
val suspendContext: SuspendContextImpl? = suspendContext
|
||||||
if (context.debuggerSession is DebuggerSession && suspendContext is SuspendContextImpl && !suspendContext.isResumed) {
|
if (context.debuggerSession is DebuggerSession && suspendContext is SuspendContextImpl && !suspendContext.isResumed) {
|
||||||
var infoCache = CoroutinesDebugProbesProxy(suspendContext).dumpCoroutines()
|
var infoCache = CoroutineDebugProbesProxy(suspendContext).dumpCoroutines()
|
||||||
if (infoCache.isOk()) {
|
if (infoCache.isOk()) {
|
||||||
val evaluationContext = evaluationContext(suspendContext)
|
val evaluationContext = evaluationContext(suspendContext)
|
||||||
for (state in infoCache.cache) {
|
for (state in infoCache.cache) {
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.data
|
package org.jetbrains.kotlin.idea.debugger.coroutine.data
|
||||||
|
|
||||||
import com.intellij.debugger.jdi.GeneratedLocation
|
import com.intellij.debugger.jdi.GeneratedLocation
|
||||||
import com.intellij.debugger.memory.utils.StackFrameItem
|
import com.intellij.debugger.memory.utils.StackFrameItem
|
||||||
+2
-2
@@ -3,10 +3,10 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.data
|
package org.jetbrains.kotlin.idea.debugger.coroutine.data
|
||||||
|
|
||||||
import com.sun.jdi.*
|
import com.sun.jdi.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.command.CoroutineStackFrameItem
|
import org.jetbrains.kotlin.idea.debugger.coroutine.command.CoroutineStackFrameItem
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents state of a coroutine.
|
* Represents state of a coroutine.
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.data
|
package org.jetbrains.kotlin.idea.debugger.coroutine.data
|
||||||
|
|
||||||
import com.intellij.debugger.engine.JavaStackFrame
|
import com.intellij.debugger.engine.JavaStackFrame
|
||||||
import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl
|
import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.data
|
package org.jetbrains.kotlin.idea.debugger.coroutine.data
|
||||||
|
|
||||||
import com.intellij.debugger.engine.evaluation.EvaluateException
|
import com.intellij.debugger.engine.evaluation.EvaluateException
|
||||||
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
|
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
|
||||||
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.data
|
package org.jetbrains.kotlin.idea.debugger.coroutine.data
|
||||||
|
|
||||||
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
|
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
|
||||||
import com.intellij.debugger.impl.descriptors.data.DescriptorData
|
import com.intellij.debugger.impl.descriptors.data.DescriptorData
|
||||||
@@ -14,7 +14,7 @@ import com.intellij.debugger.memory.utils.StackFrameItem
|
|||||||
import com.intellij.debugger.ui.impl.watch.NodeDescriptorImpl
|
import com.intellij.debugger.ui.impl.watch.NodeDescriptorImpl
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.sun.jdi.*
|
import com.sun.jdi.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.LookupContinuation
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.LookupContinuation
|
||||||
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
||||||
|
|
||||||
@Deprecated("moved to XCoroutineView")
|
@Deprecated("moved to XCoroutineView")
|
||||||
+3
-3
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.proxy
|
package org.jetbrains.kotlin.idea.debugger.coroutine.proxy
|
||||||
|
|
||||||
import com.intellij.debugger.DebuggerContext
|
import com.intellij.debugger.DebuggerContext
|
||||||
import com.intellij.debugger.engine.JavaValue
|
import com.intellij.debugger.engine.JavaValue
|
||||||
@@ -15,9 +15,9 @@ import com.intellij.xdebugger.frame.XNamedValue
|
|||||||
import com.sun.jdi.*
|
import com.sun.jdi.*
|
||||||
import org.jetbrains.kotlin.codegen.coroutines.CONTINUATION_VARIABLE_NAME
|
import org.jetbrains.kotlin.codegen.coroutines.CONTINUATION_VARIABLE_NAME
|
||||||
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.util.logger
|
import org.jetbrains.kotlin.idea.debugger.coroutine.util.logger
|
||||||
import org.jetbrains.kotlin.idea.debugger.SUSPEND_LAMBDA_CLASSES
|
import org.jetbrains.kotlin.idea.debugger.SUSPEND_LAMBDA_CLASSES
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineAsyncStackFrameItem
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineAsyncStackFrameItem
|
||||||
import org.jetbrains.kotlin.idea.debugger.isSubtype
|
import org.jetbrains.kotlin.idea.debugger.isSubtype
|
||||||
import org.jetbrains.kotlin.idea.debugger.safeVisibleVariableByName
|
import org.jetbrains.kotlin.idea.debugger.safeVisibleVariableByName
|
||||||
|
|
||||||
+6
-6
@@ -2,20 +2,20 @@
|
|||||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.proxy
|
package org.jetbrains.kotlin.idea.debugger.coroutine.proxy
|
||||||
|
|
||||||
import com.intellij.debugger.engine.SuspendContextImpl
|
import com.intellij.debugger.engine.SuspendContextImpl
|
||||||
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
|
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
|
||||||
import com.intellij.debugger.jdi.StackFrameProxyImpl
|
import com.intellij.debugger.jdi.StackFrameProxyImpl
|
||||||
import com.intellij.xdebugger.frame.XSuspendContext
|
import com.intellij.xdebugger.frame.XSuspendContext
|
||||||
import com.sun.jdi.*
|
import com.sun.jdi.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.command.CoroutineBuilder
|
import org.jetbrains.kotlin.idea.debugger.coroutine.command.CoroutineBuilder
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.view.CoroutineInfoCache
|
import org.jetbrains.kotlin.idea.debugger.coroutine.view.CoroutineInfoCache
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineInfoData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineInfoData
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.util.logger
|
import org.jetbrains.kotlin.idea.debugger.coroutine.util.logger
|
||||||
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
||||||
|
|
||||||
class CoroutinesDebugProbesProxy(val suspendContext: XSuspendContext) {
|
class CoroutineDebugProbesProxy(val suspendContext: XSuspendContext) {
|
||||||
private val log by logger
|
private val log by logger
|
||||||
|
|
||||||
private var executionContext: ExecutionContext = executionContext()
|
private var executionContext: ExecutionContext = executionContext()
|
||||||
+2
-2
@@ -3,10 +3,10 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.proxy
|
package org.jetbrains.kotlin.idea.debugger.coroutine.proxy
|
||||||
|
|
||||||
import com.sun.jdi.*
|
import com.sun.jdi.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineInfoData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineInfoData
|
||||||
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
||||||
import org.jetbrains.kotlin.idea.debugger.isSubtype
|
import org.jetbrains.kotlin.idea.debugger.isSubtype
|
||||||
|
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.proxy
|
package org.jetbrains.kotlin.idea.debugger.coroutine.proxy
|
||||||
|
|
||||||
import com.intellij.debugger.engine.DebugProcessImpl
|
import com.intellij.debugger.engine.DebugProcessImpl
|
||||||
import com.intellij.debugger.engine.SuspendContextImpl
|
import com.intellij.debugger.engine.SuspendContextImpl
|
||||||
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.util
|
package org.jetbrains.kotlin.idea.debugger.coroutine.util
|
||||||
|
|
||||||
import com.intellij.debugger.jdi.StackFrameProxyImpl
|
import com.intellij.debugger.jdi.StackFrameProxyImpl
|
||||||
import com.intellij.debugger.ui.impl.watch.MethodsTracker
|
import com.intellij.debugger.ui.impl.watch.MethodsTracker
|
||||||
@@ -15,7 +15,7 @@ import com.intellij.psi.search.GlobalSearchScope
|
|||||||
import com.intellij.xdebugger.XDebuggerUtil
|
import com.intellij.xdebugger.XDebuggerUtil
|
||||||
import com.intellij.xdebugger.XSourcePosition
|
import com.intellij.xdebugger.XSourcePosition
|
||||||
import com.intellij.xdebugger.impl.XDebuggerManagerImpl
|
import com.intellij.xdebugger.impl.XDebuggerManagerImpl
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.ApplicationThreadExecutor
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.ApplicationThreadExecutor
|
||||||
|
|
||||||
fun getPosition(stackTraceElement: StackTraceElement, project: Project): XSourcePosition? {
|
fun getPosition(stackTraceElement: StackTraceElement, project: Project): XSourcePosition? {
|
||||||
val psiFacade = JavaPsiFacade.getInstance(project)
|
val psiFacade = JavaPsiFacade.getInstance(project)
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.util
|
package org.jetbrains.kotlin.idea.debugger.coroutine.util
|
||||||
|
|
||||||
import com.intellij.openapi.diagnostic.Logger
|
import com.intellij.openapi.diagnostic.Logger
|
||||||
import com.intellij.xdebugger.XDebugSession
|
import com.intellij.xdebugger.XDebugSession
|
||||||
+1
-3
@@ -3,9 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.util;
|
package org.jetbrains.kotlin.idea.debugger.coroutine.util;
|
||||||
|
|
||||||
import com.intellij.xdebugger.XSourcePosition;
|
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.view
|
package org.jetbrains.kotlin.idea.debugger.coroutine.view
|
||||||
|
|
||||||
import com.intellij.codeInsight.highlighting.HighlightManager
|
import com.intellij.codeInsight.highlighting.HighlightManager
|
||||||
import com.intellij.execution.ui.ConsoleView
|
import com.intellij.execution.ui.ConsoleView
|
||||||
@@ -32,7 +32,7 @@ import com.intellij.ui.components.JBList
|
|||||||
import com.intellij.unscramble.AnalyzeStacktraceUtil
|
import com.intellij.unscramble.AnalyzeStacktraceUtil
|
||||||
import com.intellij.util.PlatformIcons
|
import com.intellij.util.PlatformIcons
|
||||||
import com.intellij.util.ui.EmptyIcon
|
import com.intellij.util.ui.EmptyIcon
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineInfoData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineInfoData
|
||||||
import java.awt.BorderLayout
|
import java.awt.BorderLayout
|
||||||
import java.awt.Color
|
import java.awt.Color
|
||||||
import java.awt.datatransfer.StringSelection
|
import java.awt.datatransfer.StringSelection
|
||||||
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.view
|
package org.jetbrains.kotlin.idea.debugger.coroutine.view
|
||||||
|
|
||||||
import com.intellij.debugger.engine.SuspendContextImpl
|
import com.intellij.debugger.engine.SuspendContextImpl
|
||||||
import com.intellij.openapi.application.ApplicationManager
|
import com.intellij.openapi.application.ApplicationManager
|
||||||
@@ -12,7 +12,7 @@ import com.intellij.xdebugger.XDebugSessionListener
|
|||||||
import com.intellij.xdebugger.frame.XSuspendContext
|
import com.intellij.xdebugger.frame.XSuspendContext
|
||||||
import com.intellij.xdebugger.impl.ui.DebuggerUIUtil
|
import com.intellij.xdebugger.impl.ui.DebuggerUIUtil
|
||||||
import com.sun.jdi.request.EventRequest
|
import com.sun.jdi.request.EventRequest
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.util.logger
|
import org.jetbrains.kotlin.idea.debugger.coroutine.util.logger
|
||||||
|
|
||||||
class CoroutineViewDebugSessionListener(
|
class CoroutineViewDebugSessionListener(
|
||||||
private val session: XDebugSession,
|
private val session: XDebugSession,
|
||||||
+9
-9
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.view
|
package org.jetbrains.kotlin.idea.debugger.coroutine.view
|
||||||
|
|
||||||
import com.intellij.debugger.DebuggerBundle
|
import com.intellij.debugger.DebuggerBundle
|
||||||
import com.intellij.debugger.engine.events.DebuggerCommandImpl
|
import com.intellij.debugger.engine.events.DebuggerCommandImpl
|
||||||
@@ -15,14 +15,14 @@ import com.intellij.debugger.ui.impl.watch.*
|
|||||||
import com.intellij.debugger.ui.tree.StackFrameDescriptor
|
import com.intellij.debugger.ui.tree.StackFrameDescriptor
|
||||||
import com.intellij.openapi.application.ApplicationManager
|
import com.intellij.openapi.application.ApplicationManager
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.command.CoroutineBuildCreationFrameCommand
|
import org.jetbrains.kotlin.idea.debugger.coroutine.command.CoroutineBuildCreationFrameCommand
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.command.CoroutineBuildFrameCommand
|
import org.jetbrains.kotlin.idea.debugger.coroutine.command.CoroutineBuildFrameCommand
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.command.RefreshCoroutinesTreeCommand
|
import org.jetbrains.kotlin.idea.debugger.coroutine.command.RefreshCoroutinesTreeCommand
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineDescriptorImpl
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineDescriptorImpl
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineInfoData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineInfoData
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CreationFramesDescriptor
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CreationFramesDescriptor
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.ManagerThreadExecutor
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.ManagerThreadExecutor
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.util.logger
|
import org.jetbrains.kotlin.idea.debugger.coroutine.util.logger
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+2
-2
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
@file:Suppress("DEPRECATION")
|
@file:Suppress("DEPRECATION")
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.view
|
package org.jetbrains.kotlin.idea.debugger.coroutine.view
|
||||||
|
|
||||||
import com.intellij.debugger.actions.DebuggerActions
|
import com.intellij.debugger.actions.DebuggerActions
|
||||||
import com.intellij.debugger.impl.DebuggerStateManager
|
import com.intellij.debugger.impl.DebuggerStateManager
|
||||||
@@ -13,7 +13,7 @@ import com.intellij.debugger.ui.impl.ThreadsPanel
|
|||||||
import com.intellij.debugger.ui.impl.watch.DebuggerTree
|
import com.intellij.debugger.ui.impl.watch.DebuggerTree
|
||||||
import com.intellij.openapi.actionSystem.*
|
import com.intellij.openapi.actionSystem.*
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.CoroutineDebuggerActions
|
import org.jetbrains.kotlin.idea.debugger.coroutine.CoroutineDebuggerActions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added into ui in [CoroutineProjectConnectionListener.registerCoroutinesPanel]
|
* Added into ui in [CoroutineProjectConnectionListener.registerCoroutinesPanel]
|
||||||
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.view
|
package org.jetbrains.kotlin.idea.debugger.coroutine.view
|
||||||
|
|
||||||
import com.intellij.debugger.impl.DebuggerUtilsEx
|
import com.intellij.debugger.impl.DebuggerUtilsEx
|
||||||
import com.intellij.debugger.settings.ThreadsViewSettings
|
import com.intellij.debugger.settings.ThreadsViewSettings
|
||||||
@@ -19,7 +19,7 @@ import com.intellij.xdebugger.impl.ui.DebuggerUIUtil
|
|||||||
import com.intellij.xdebugger.impl.ui.XDebuggerUIConstants
|
import com.intellij.xdebugger.impl.ui.XDebuggerUIConstants
|
||||||
import com.sun.jdi.Location
|
import com.sun.jdi.Location
|
||||||
import com.sun.jdi.ReferenceType
|
import com.sun.jdi.ReferenceType
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineInfoData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineInfoData
|
||||||
import javax.swing.Icon
|
import javax.swing.Icon
|
||||||
|
|
||||||
class SimpleColoredTextIcon(val icon: Icon?, val hasChildrens: Boolean) {
|
class SimpleColoredTextIcon(val icon: Icon?, val hasChildrens: Boolean) {
|
||||||
+15
-16
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.coroutines.view
|
package org.jetbrains.kotlin.idea.debugger.coroutine.view
|
||||||
|
|
||||||
import com.intellij.debugger.DebuggerManagerEx
|
import com.intellij.debugger.DebuggerManagerEx
|
||||||
import com.intellij.debugger.engine.DebugProcessImpl
|
import com.intellij.debugger.engine.DebugProcessImpl
|
||||||
@@ -32,18 +32,18 @@ import com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl
|
|||||||
import com.sun.jdi.ClassType
|
import com.sun.jdi.ClassType
|
||||||
import javaslang.control.Either
|
import javaslang.control.Either
|
||||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.CoroutineAsyncStackTraceProvider
|
import org.jetbrains.kotlin.idea.debugger.coroutine.CoroutineAsyncStackTraceProvider
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.CoroutineDebuggerContentInfo
|
import org.jetbrains.kotlin.idea.debugger.coroutine.CoroutineDebuggerContentInfo
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.CoroutineDebuggerContentInfo.Companion.XCOROUTINE_POPUP_ACTION_GROUP
|
import org.jetbrains.kotlin.idea.debugger.coroutine.CoroutineDebuggerContentInfo.Companion.XCOROUTINE_POPUP_ACTION_GROUP
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.command.*
|
import org.jetbrains.kotlin.idea.debugger.coroutine.command.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineInfoData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineInfoData
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.SuspendStackFrameDescriptor
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.SuspendStackFrameDescriptor
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.SyntheticStackFrame
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.SyntheticStackFrame
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.ApplicationThreadExecutor
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.ApplicationThreadExecutor
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.AsyncStackTraceContext
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.AsyncStackTraceContext
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.CoroutinesDebugProbesProxy
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.CoroutineDebugProbesProxy
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.ManagerThreadExecutor
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.ManagerThreadExecutor
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.util.*
|
import org.jetbrains.kotlin.idea.debugger.coroutine.util.*
|
||||||
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
||||||
import java.awt.event.KeyAdapter
|
import java.awt.event.KeyAdapter
|
||||||
import java.awt.event.KeyEvent
|
import java.awt.event.KeyEvent
|
||||||
@@ -52,7 +52,6 @@ import java.awt.event.MouseEvent
|
|||||||
|
|
||||||
class XCoroutineView(val project: Project, val session: XDebugSession) :
|
class XCoroutineView(val project: Project, val session: XDebugSession) :
|
||||||
Disposable, XDebugSessionListenerProvider, CreateContentParamsProvider {
|
Disposable, XDebugSessionListenerProvider, CreateContentParamsProvider {
|
||||||
private var needToRestoreState: Boolean = false
|
|
||||||
val log by logger
|
val log by logger
|
||||||
val splitter = OnePixelSplitter("SomeKey", 0.25f)
|
val splitter = OnePixelSplitter("SomeKey", 0.25f)
|
||||||
val panel = XDebuggerTreePanel(project, session.debugProcess.editorsProvider, this, null, XCOROUTINE_POPUP_ACTION_GROUP, null)
|
val panel = XDebuggerTreePanel(project, session.debugProcess.editorsProvider, this, null, XCOROUTINE_POPUP_ACTION_GROUP, null)
|
||||||
@@ -139,7 +138,7 @@ class XCoroutineView(val project: Project, val session: XDebugSession) :
|
|||||||
|
|
||||||
override fun computeChildren(node: XCompositeNode) {
|
override fun computeChildren(node: XCompositeNode) {
|
||||||
managerThreadExecutor.on(suspendContext).schedule {
|
managerThreadExecutor.on(suspendContext).schedule {
|
||||||
val debugProbesProxy = CoroutinesDebugProbesProxy(suspendContext)
|
val debugProbesProxy = CoroutineDebugProbesProxy(suspendContext)
|
||||||
|
|
||||||
var coroutineCache = debugProbesProxy.dumpCoroutines()
|
var coroutineCache = debugProbesProxy.dumpCoroutines()
|
||||||
if (coroutineCache.isOk()) {
|
if (coroutineCache.isOk()) {
|
||||||
@@ -164,7 +163,7 @@ class XCoroutineView(val project: Project, val session: XDebugSession) :
|
|||||||
|
|
||||||
override fun computeChildren(node: XCompositeNode) {
|
override fun computeChildren(node: XCompositeNode) {
|
||||||
managerThreadExecutor.on(suspendContext).schedule {
|
managerThreadExecutor.on(suspendContext).schedule {
|
||||||
val debugProbesProxy = CoroutinesDebugProbesProxy(suspendContext)
|
val debugProbesProxy = CoroutineDebugProbesProxy(suspendContext)
|
||||||
val children = XValueChildrenList()
|
val children = XValueChildrenList()
|
||||||
debugProbesProxy.frameBuilder().build(infoData)
|
debugProbesProxy.frameBuilder().build(infoData)
|
||||||
val creationStack = mutableListOf<CreationCoroutineStackFrameItem>()
|
val creationStack = mutableListOf<CreationCoroutineStackFrameItem>()
|
||||||
@@ -9,6 +9,7 @@ dependencies {
|
|||||||
testCompile(project(":idea:jvm-debugger:jvm-debugger-core"))
|
testCompile(project(":idea:jvm-debugger:jvm-debugger-core"))
|
||||||
testCompile(project(":idea:jvm-debugger:jvm-debugger-evaluation"))
|
testCompile(project(":idea:jvm-debugger:jvm-debugger-evaluation"))
|
||||||
testCompile(project(":idea:jvm-debugger:jvm-debugger-sequence"))
|
testCompile(project(":idea:jvm-debugger:jvm-debugger-sequence"))
|
||||||
|
testCompile(project(":idea:jvm-debugger:jvm-debugger-coroutine"))
|
||||||
testCompile(project(":compiler:backend"))
|
testCompile(project(":compiler:backend"))
|
||||||
testCompile(files("${System.getProperty("java.home")}/../lib/tools.jar"))
|
testCompile(files("${System.getProperty("java.home")}/../lib/tools.jar"))
|
||||||
testCompile(project(":kotlin-test:kotlin-test-junit"))
|
testCompile(project(":kotlin-test:kotlin-test-junit"))
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ import com.intellij.debugger.engine.JavaValue
|
|||||||
import com.intellij.debugger.memory.utils.StackFrameItem
|
import com.intellij.debugger.memory.utils.StackFrameItem
|
||||||
import com.intellij.execution.process.ProcessOutputTypes
|
import com.intellij.execution.process.ProcessOutputTypes
|
||||||
import com.intellij.openapi.extensions.Extensions
|
import com.intellij.openapi.extensions.Extensions
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.CoroutineAsyncStackTraceProvider
|
import org.jetbrains.kotlin.idea.debugger.coroutine.CoroutineAsyncStackTraceProvider
|
||||||
import org.jetbrains.kotlin.idea.debugger.test.preference.DebuggerPreferences
|
import org.jetbrains.kotlin.idea.debugger.test.preference.DebuggerPreferences
|
||||||
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
|
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
|
||||||
import org.jetbrains.kotlin.utils.getSafe
|
import org.jetbrains.kotlin.utils.getSafe
|
||||||
|
|||||||
+4
-4
@@ -11,14 +11,14 @@ import com.intellij.jarRepository.JarRepositoryManager
|
|||||||
import com.intellij.jarRepository.RemoteRepositoryDescription
|
import com.intellij.jarRepository.RemoteRepositoryDescription
|
||||||
import org.jetbrains.idea.maven.aether.ArtifactKind
|
import org.jetbrains.idea.maven.aether.ArtifactKind
|
||||||
import org.jetbrains.jps.model.library.JpsMavenRepositoryLibraryDescriptor
|
import org.jetbrains.jps.model.library.JpsMavenRepositoryLibraryDescriptor
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.data.CoroutineInfoData
|
import org.jetbrains.kotlin.idea.debugger.coroutine.data.CoroutineInfoData
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutines.proxy.CoroutinesDebugProbesProxy
|
import org.jetbrains.kotlin.idea.debugger.coroutine.proxy.CoroutineDebugProbesProxy
|
||||||
import org.jetbrains.kotlin.idea.debugger.test.preference.DebuggerPreferences
|
import org.jetbrains.kotlin.idea.debugger.test.preference.DebuggerPreferences
|
||||||
|
|
||||||
abstract class AbstractCoroutineDumpTest : KotlinDescriptorTestCaseWithStepping() {
|
abstract class AbstractCoroutineDumpTest : KotlinDescriptorTestCaseWithStepping() {
|
||||||
override fun doMultiFileTest(files: TestFiles, preferences: DebuggerPreferences) {
|
override fun doMultiFileTest(files: TestFiles, preferences: DebuggerPreferences) {
|
||||||
doOnBreakpoint {
|
doOnBreakpoint {
|
||||||
val infoCache = CoroutinesDebugProbesProxy(this).dumpCoroutines()
|
val infoCache = CoroutineDebugProbesProxy(this).dumpCoroutines()
|
||||||
try {
|
try {
|
||||||
if (infoCache.isOk())
|
if (infoCache.isOk())
|
||||||
try {
|
try {
|
||||||
@@ -34,7 +34,7 @@ abstract class AbstractCoroutineDumpTest : KotlinDescriptorTestCaseWithStepping(
|
|||||||
}
|
}
|
||||||
|
|
||||||
doOnBreakpoint {
|
doOnBreakpoint {
|
||||||
val infoCache = CoroutinesDebugProbesProxy(this).dumpCoroutines()
|
val infoCache = CoroutineDebugProbesProxy(this).dumpCoroutines()
|
||||||
try {
|
try {
|
||||||
if (infoCache.isOk())
|
if (infoCache.isOk())
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<group id="Kotlin.XDebugger.Actions">
|
<group id="Kotlin.XDebugger.Actions">
|
||||||
<!-- TODO(design)-->
|
<!-- TODO(design)-->
|
||||||
<action id="Kotlin.XDebugger.CoroutinesDump"
|
<action id="Kotlin.XDebugger.CoroutinesDump"
|
||||||
class="org.jetbrains.kotlin.idea.debugger.coroutines.command.CoroutineDumpAction"
|
class="org.jetbrains.kotlin.idea.debugger.coroutine.command.CoroutineDumpAction"
|
||||||
text="Get Coroutines Dump"
|
text="Get Coroutines Dump"
|
||||||
icon="/org/jetbrains/kotlin/idea/icons/kotlin.png"/>
|
icon="/org/jetbrains/kotlin/idea/icons/kotlin.png"/>
|
||||||
</group>
|
</group>
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
<applicationService serviceImplementation="org.jetbrains.kotlin.idea.debugger.ToggleKotlinVariablesState"/>
|
<applicationService serviceImplementation="org.jetbrains.kotlin.idea.debugger.ToggleKotlinVariablesState"/>
|
||||||
|
|
||||||
<debugger.asyncStackTraceProvider implementation="org.jetbrains.kotlin.idea.debugger.coroutines.CoroutineAsyncStackTraceProvider"/>
|
<debugger.asyncStackTraceProvider implementation="org.jetbrains.kotlin.idea.debugger.coroutine.CoroutineAsyncStackTraceProvider"/>
|
||||||
<debugger.jvmSmartStepIntoHandler implementation="org.jetbrains.kotlin.idea.debugger.stepping.smartStepInto.KotlinSmartStepIntoHandler"/>
|
<debugger.jvmSmartStepIntoHandler implementation="org.jetbrains.kotlin.idea.debugger.stepping.smartStepInto.KotlinSmartStepIntoHandler"/>
|
||||||
<debugger.positionManagerFactory implementation="org.jetbrains.kotlin.idea.debugger.KotlinPositionManagerFactory"/>
|
<debugger.positionManagerFactory implementation="org.jetbrains.kotlin.idea.debugger.KotlinPositionManagerFactory"/>
|
||||||
<debugger.codeFragmentFactory implementation="org.jetbrains.kotlin.idea.debugger.evaluate.KotlinCodeFragmentFactory"/>
|
<debugger.codeFragmentFactory implementation="org.jetbrains.kotlin.idea.debugger.evaluate.KotlinCodeFragmentFactory"/>
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<debugger.javaBreakpointHandlerFactory implementation="org.jetbrains.kotlin.idea.debugger.breakpoints.KotlinFunctionBreakpointHandlerFactory"/>
|
<debugger.javaBreakpointHandlerFactory implementation="org.jetbrains.kotlin.idea.debugger.breakpoints.KotlinFunctionBreakpointHandlerFactory"/>
|
||||||
<debugger.jvmSteppingCommandProvider implementation="org.jetbrains.kotlin.idea.debugger.stepping.KotlinSteppingCommandProvider"/>
|
<debugger.jvmSteppingCommandProvider implementation="org.jetbrains.kotlin.idea.debugger.stepping.KotlinSteppingCommandProvider"/>
|
||||||
<debugger.simplePropertyGetterProvider implementation="org.jetbrains.kotlin.idea.debugger.stepping.KotlinSimpleGetterProvider"/>
|
<debugger.simplePropertyGetterProvider implementation="org.jetbrains.kotlin.idea.debugger.stepping.KotlinSimpleGetterProvider"/>
|
||||||
<runConfigurationExtension implementation="org.jetbrains.kotlin.idea.debugger.coroutines.CoroutinesDebugConfigurationExtension"/>
|
<runConfigurationExtension implementation="org.jetbrains.kotlin.idea.debugger.coroutine.CoroutineDebugConfigurationExtension"/>
|
||||||
|
|
||||||
<framework.type implementation="org.jetbrains.kotlin.idea.framework.JavaFrameworkType"/>
|
<framework.type implementation="org.jetbrains.kotlin.idea.framework.JavaFrameworkType"/>
|
||||||
<projectTemplatesFactory implementation="org.jetbrains.kotlin.idea.framework.KotlinTemplatesFactory" />
|
<projectTemplatesFactory implementation="org.jetbrains.kotlin.idea.framework.KotlinTemplatesFactory" />
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ val projectsToShadow by extra(listOf(
|
|||||||
":idea:jvm-debugger:jvm-debugger-util",
|
":idea:jvm-debugger:jvm-debugger-util",
|
||||||
":idea:jvm-debugger:jvm-debugger-core",
|
":idea:jvm-debugger:jvm-debugger-core",
|
||||||
":idea:jvm-debugger:jvm-debugger-evaluation",
|
":idea:jvm-debugger:jvm-debugger-evaluation",
|
||||||
|
":idea:jvm-debugger:jvm-debugger-coroutine",
|
||||||
":idea:jvm-debugger:jvm-debugger-sequence",
|
":idea:jvm-debugger:jvm-debugger-sequence",
|
||||||
":idea:scripting-support",
|
":idea:scripting-support",
|
||||||
":idea:idea-j2k",
|
":idea:idea-j2k",
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ include ":kotlin-build-common",
|
|||||||
":idea:jvm-debugger:jvm-debugger-core",
|
":idea:jvm-debugger:jvm-debugger-core",
|
||||||
":idea:jvm-debugger:jvm-debugger-evaluation",
|
":idea:jvm-debugger:jvm-debugger-evaluation",
|
||||||
":idea:jvm-debugger:jvm-debugger-sequence",
|
":idea:jvm-debugger:jvm-debugger-sequence",
|
||||||
|
":idea:jvm-debugger:jvm-debugger-coroutine",
|
||||||
":idea:jvm-debugger:jvm-debugger-test",
|
":idea:jvm-debugger:jvm-debugger-test",
|
||||||
":idea:scripting-support",
|
":idea:scripting-support",
|
||||||
":libraries:tools:new-project-wizard",
|
":libraries:tools:new-project-wizard",
|
||||||
|
|||||||
Reference in New Issue
Block a user