diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java index 1cf1c59afac2..d28f9aa6c600 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java @@ -510,7 +510,12 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzer implements JDOMEx myAlarm.cancelAllRequests(); boolean restart = toRestartAlarm && !myDisposed && myInitialized; if (restart) { - myAlarm.addRequest(myUpdateRunnable, mySettings.AUTOREPARSE_DELAY); + UIUtil.invokeLaterIfNeeded(new Runnable() { + @Override + public void run() { + myAlarm.addRequest(myUpdateRunnable, mySettings.AUTOREPARSE_DELAY); + } + }); } }