From 0f15b6d28a8837fa9b79c4825e36100e6182bafa Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 5 May 2014 09:28:03 +0200 Subject: [PATCH] restore the ability to clear console from any thread --- .../src/com/intellij/execution/impl/ConsoleViewImpl.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java b/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java index 32cc45d97452..6ba7340598b7 100644 --- a/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java +++ b/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java @@ -354,8 +354,6 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo myContentSize = 0; myBuffer.clear(); myFolding.clear(); - - clearHyperlinkAndFoldings(); } if (myFlushAlarm.isDisposed()) return; cancelAllFlushRequests(); @@ -620,13 +618,10 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo return; } if (clear) { - final DocumentEx document; + final DocumentEx document = editor.getDocument(); synchronized (LOCK) { myTokens.clear(); - editor.getMarkupModel().removeAllHighlighters(); - document = editor.getDocument(); - myFoldingAlarm.cancelAllRequests(); - cancelHeavyAlarm(); + clearHyperlinkAndFoldings(); } final int documentTextLength = document.getTextLength(); if (documentTextLength > 0) {