From d6cc3d64fe7073b3cbcf7f99768e94fc815f6dc2 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Thu, 11 Jan 2018 20:12:26 +0300 Subject: [PATCH] 172: Revert "`EdtTestUtil.runInEdtAndWait` fix for proper user action emulation" This reverts commit 4ebe750d36e86545a72177f91dc3baaa235fa92d. --- .../jetbrains/kotlin/test/testFramework/EdtTestUtil.kt.172 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/testFramework/EdtTestUtil.kt.172 b/compiler/tests-common/tests/org/jetbrains/kotlin/test/testFramework/EdtTestUtil.kt.172 index e42071d1ed6..1ccf51aa3dc 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/testFramework/EdtTestUtil.kt.172 +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/testFramework/EdtTestUtil.kt.172 @@ -16,7 +16,6 @@ package org.jetbrains.kotlin.test.testFramework -import com.intellij.openapi.application.ApplicationManager import org.jetbrains.annotations.TestOnly import java.lang.reflect.InvocationTargetException import javax.swing.SwingUtilities @@ -40,11 +39,7 @@ fun runInEdtAndWait(runnable: () -> Unit) { } else { try { - val application = ApplicationManager.getApplication() - if (application != null) - application.invokeAndWait(runnable) - else - SwingUtilities.invokeAndWait(runnable) + SwingUtilities.invokeAndWait(runnable) } catch (e: InvocationTargetException) { throw e.cause ?: e