From 9e8cf9967a49470e2dbb86327f77d406739fe0f7 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 7 Apr 2011 17:10:59 +0200 Subject: [PATCH] UsefulTestCase#edt --- .../completion/CompletionAutoPopupTestCase.groovy | 8 +------- .../src/com/intellij/testFramework/UsefulTestCase.java | 4 ++++ 2 files changed, 5 insertions(+), 7 deletions(-) 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();