fix tests: invoked later reparseFiles(file) interfere with highlighting in tests
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Wed, 8 Jun 2016 08:32:41 +0000 (11:32 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Wed, 8 Jun 2016 08:33:04 +0000 (11:33 +0300)
platform/core-api/src/com/intellij/psi/LanguageSubstitutors.java

index c78448173c1757ab43d20f13c2fd16d8ee3580c4..bdca79ca28b05c57e8ad1540d59488bf0c015751 100644 (file)
@@ -82,7 +82,7 @@ public final class LanguageSubstitutors extends LanguageExtension<LanguageSubsti
     if (ApplicationManager.getApplication().isDispatchThread()) {
       runnable.run();
     }
-    else {
+    else if (!ApplicationManager.getApplication().isUnitTestMode()) {
       ApplicationManager.getApplication().invokeLater(runnable, modalityState);
     }
   }