From 524d7a05df5ca07ba255b10f3652785a8d2b42fe Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Sun, 3 May 2015 16:54:06 +0300 Subject: [PATCH] EDT assertion --- .../com/intellij/codeInsight/daemon/impl/EditorTracker.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditorTracker.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditorTracker.java index 628de696a061..b43099cc2f75 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditorTracker.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditorTracker.java @@ -54,7 +54,7 @@ public class EditorTracker extends AbstractProjectComponent { private final Map> myWindowToEditorsMap = new HashMap>(); private final Map myWindowToWindowFocusListenerMap = new HashMap(); private final Map myEditorToWindowMap = new HashMap(); - private List myActiveEditors = Collections.emptyList(); + private List myActiveEditors = Collections.emptyList(); // accessed in EDT only private final EventDispatcher myDispatcher = EventDispatcher.create(EditorTrackerListener.class); @@ -186,7 +186,8 @@ public class EditorTracker extends AbstractProjectComponent { } @NotNull - public List getActiveEditors() { + List getActiveEditors() { + ApplicationManager.getApplication().assertIsDispatchThread(); return myActiveEditors; } @@ -210,6 +211,7 @@ public class EditorTracker extends AbstractProjectComponent { } void setActiveEditors(@NotNull List editors) { + ApplicationManager.getApplication().assertIsDispatchThread(); myActiveEditors = editors; if (LOG.isDebugEnabled()) {