Fix evaluation tests - create views in gui thread
This commit is contained in:
+11
-3
@@ -29,6 +29,8 @@ import com.intellij.debugger.settings.NodeRendererSettings
|
||||
import com.intellij.debugger.ui.impl.watch.*
|
||||
import com.intellij.debugger.ui.tree.*
|
||||
import com.intellij.execution.process.ProcessOutputTypes
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.ModalityState
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.psi.PsiElement
|
||||
@@ -122,8 +124,13 @@ abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestBase() {
|
||||
|
||||
doStepping(path)
|
||||
|
||||
val variablesView = createVariablesView()
|
||||
val watchesView = createWatchesView()
|
||||
var variablesView: XVariablesView? = null
|
||||
var watchesView: XWatchesViewImpl? = null
|
||||
|
||||
ApplicationManager.getApplication().invokeAndWait({
|
||||
variablesView = createVariablesView()
|
||||
watchesView = createWatchesView()
|
||||
}, ModalityState.any())
|
||||
|
||||
doOnBreakpoint {
|
||||
val exceptions = linkedMapOf<String, Throwable>()
|
||||
@@ -142,7 +149,7 @@ abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestBase() {
|
||||
}
|
||||
finally {
|
||||
if (shouldPrintFrame) {
|
||||
printFrame(variablesView, watchesView, PrinterConfig(skipInPrintFrame, descriptorViewOptions))
|
||||
printFrame(variablesView!!, watchesView!!, PrinterConfig(skipInPrintFrame, descriptorViewOptions))
|
||||
println(fileText, ProcessOutputTypes.SYSTEM)
|
||||
}
|
||||
else {
|
||||
@@ -152,6 +159,7 @@ abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestBase() {
|
||||
|
||||
checkExceptions(exceptions)
|
||||
}
|
||||
|
||||
finish()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user