diff --git a/java/testFramework/src/com/intellij/codeInsight/completion/CompletionAutoPopupTestCase.groovy b/java/testFramework/src/com/intellij/codeInsight/completion/CompletionAutoPopupTestCase.groovy index 96c0c4550fd8..eed959066fd0 100644 --- a/java/testFramework/src/com/intellij/codeInsight/completion/CompletionAutoPopupTestCase.groovy +++ b/java/testFramework/src/com/intellij/codeInsight/completion/CompletionAutoPopupTestCase.groovy @@ -21,9 +21,8 @@ import com.intellij.codeInsight.lookup.LookupManager import com.intellij.codeInsight.lookup.impl.LookupImpl import com.intellij.testFramework.PlatformTestUtil import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase -import com.intellij.util.ui.UIUtil - /** +/** * @author peter */ abstract class CompletionAutoPopupTestCase extends LightCodeInsightFixtureTestCase { @@ -73,11 +72,6 @@ abstract class CompletionAutoPopupTestCase extends LightCodeInsightFixtureTestCa edt { PlatformTestUtil.waitForAlarm(CodeInsightSettings.instance.AUTO_LOOKUP_DELAY)} } - protected void edt(Closure c) { - UIUtil.invokeAndWaitIfNeeded(c as Runnable) - } - - @Override protected void runTest() { runTestBare() } diff --git a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java index 117c27e406ee..185890c6c6db 100644 --- a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java @@ -219,6 +219,10 @@ public abstract class UsefulTestCase extends TestCase { } } + public static void edt(Runnable r) { + UIUtil.invokeAndWaitIfNeeded(r); + } + protected void invokeTestRunnable(Runnable runnable) throws Exception { UIUtil.invokeAndWaitIfNeeded(runnable); //runnable.run();