Move getting source position to manager thread in tests

Real usages are performed in this thread too. Using AWT now fails
under runInReadActionWithWriteActionPriorityWithRetries added in
https://github.com/JetBrains/intellij-community/commit/b0e995b41e9f4c0d7a64b912d3708da179cf413c
This commit is contained in:
Nikolay Krasko
2017-03-17 16:51:37 +03:00
committed by Dmitry Jemerov
parent ecd56c6a40
commit 4edfd0d960
@@ -210,7 +210,7 @@ abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestBase() {
} }
private fun SuspendContextImpl.printFrame(variablesView: XVariablesView, watchesView: XWatchesViewImpl, config: PrinterConfig) { private fun SuspendContextImpl.printFrame(variablesView: XVariablesView, watchesView: XWatchesViewImpl, config: PrinterConfig) {
val tree = variablesView.tree!! val tree = variablesView.tree
expandAll( expandAll(
tree, tree,
{ {
@@ -316,7 +316,9 @@ abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestBase() {
append(getPrefix(descriptor)) append(getPrefix(descriptor))
append(label) append(label)
if (config.shouldRenderSourcesPosition() && hasSourcePosition(descriptor)) { if (config.shouldRenderSourcesPosition() && hasSourcePosition(descriptor)) {
val sp = SourcePositionProvider.getSourcePosition(descriptor, myProject, debuggerContext) val sp = invokeInManagerThread {
SourcePositionProvider.getSourcePosition(descriptor, myProject, debuggerContext)
}
append(" (sp = ${render(sp)})") append(" (sp = ${render(sp)})")
} }