clear range highlighters from the editor just highlighted semi-leaking via the daemon->progress indicator->session user data->editor color scheme->editor->highlighters

This commit is contained in:
Alexey Kudravtsev
2018-02-14 15:13:37 +03:00
parent 9da23da737
commit ad2b1f6c33
2 changed files with 5 additions and 0 deletions
@@ -156,4 +156,8 @@ public class HighlightingSessionImpl implements HighlightingSession {
ApplicationManager.getApplication().assertIsDispatchThread();
myEDTQueue.drain();
}
static void clearProgressIndicator(@NotNull DaemonProgressIndicator indicator) {
indicator.putUserData(HIGHLIGHTING_SESSION, null);
}
}
@@ -891,6 +891,7 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx implements Pers
public void stopIfRunning() {
super.stopIfRunning();
myProject.getMessageBus().syncPublisher(DAEMON_EVENT_TOPIC).daemonFinished();
HighlightingSessionImpl.clearProgressIndicator(this);
}
};
progress.setModalityProgress(null);