summaryrefslogtreecommitdiff
path: root/java/testFramework/src/com/intellij/codeInsight
diff options
context:
space:
mode:
Diffstat (limited to 'java/testFramework/src/com/intellij/codeInsight')
-rw-r--r--java/testFramework/src/com/intellij/codeInsight/CodeInsightTestCase.java2
-rw-r--r--java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java4
-rw-r--r--java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java1
3 files changed, 6 insertions, 1 deletions
diff --git a/java/testFramework/src/com/intellij/codeInsight/CodeInsightTestCase.java b/java/testFramework/src/com/intellij/codeInsight/CodeInsightTestCase.java
index 6ecec97f7fe7..631738835371 100644
--- a/java/testFramework/src/com/intellij/codeInsight/CodeInsightTestCase.java
+++ b/java/testFramework/src/com/intellij/codeInsight/CodeInsightTestCase.java
@@ -77,6 +77,8 @@ public abstract class CodeInsightTestCase extends PsiTestCase {
Editor editor = instance.openTextEditor(new OpenFileDescriptor(myProject, file, 0), false);
((EditorImpl)editor).setCaretActive();
+ PsiDocumentManager.getInstance(getProject()).commitAllDocuments();
+
return editor;
}
diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java
index b9e5ba977a5f..7160dc96787d 100644
--- a/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java
+++ b/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,6 +77,7 @@ import com.intellij.testFramework.LightPlatformTestCase;
import com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.containers.ContainerUtil;
+import com.intellij.util.ui.UIUtil;
import com.intellij.xml.XmlSchemaProvider;
import gnu.trove.THashMap;
import gnu.trove.TIntArrayList;
@@ -424,6 +425,7 @@ public abstract class DaemonAnalyzerTestCase extends CodeInsightTestCase {
assertNotNull(intentionActionName, intentionAction);
assertTrue(ShowIntentionActionsHandler.chooseActionAndInvoke(file, editor, intentionAction, intentionActionName));
+ UIUtil.dispatchAllInvocationEvents();
}
protected static IntentionAction findIntentionAction(@NotNull Collection<HighlightInfo> infos, @NotNull String intentionActionName, @NotNull Editor editor,
diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java
index 9bf434c3e0f5..26a52c661cf6 100644
--- a/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java
+++ b/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java
@@ -185,6 +185,7 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase
protected static void invoke(IntentionAction action) throws IncorrectOperationException {
ShowIntentionActionsHandler.chooseActionAndInvoke(getFile(), getEditor(), action, action.getText());
+ UIUtil.dispatchAllInvocationEvents();
}
protected IntentionAction findActionWithText(final String text) {