From 6cf0484bb5dfd228048924d0e7773adf8a176ba9 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Thu, 29 Nov 2012 16:49:05 +0400 Subject: [PATCH] EA-35490 - assert: LaterInvocator.getCurrentModalEntities (r: Dmitry Avdeev) --- .../codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); + } + }); } }