From 5f8a926481206c6d4e6a05f6ae7a3e31cd4034f3 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 12 May 2014 15:13:17 +0200 Subject: [PATCH] let EditorHyperlinkSupport.clearHyperlinks clear the hyperlinks --- .../intellij/execution/impl/EditorHyperlinkSupport.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/execution/impl/EditorHyperlinkSupport.java b/platform/platform-impl/src/com/intellij/execution/impl/EditorHyperlinkSupport.java index 75af99008719..cd259ce6485b 100644 --- a/platform/platform-impl/src/com/intellij/execution/impl/EditorHyperlinkSupport.java +++ b/platform/platform-impl/src/com/intellij/execution/impl/EditorHyperlinkSupport.java @@ -99,10 +99,11 @@ public class EditorHyperlinkSupport { ); } - /** - * @deprecated hyperlinks are gc'ed automatically as the text is cleared - */ - public void clearHyperlinks() {} + public void clearHyperlinks() { + for (RangeHighlighter highlighter : getHyperlinks(0, myEditor.getDocument().getTextLength(), myEditor)) { + removeHyperlink(highlighter); + } + } @Nullable public Runnable getLinkNavigationRunnable(final LogicalPosition logical) {