From 41b5825bded7dd06b4853218268f4e318f7e1931 Mon Sep 17 00:00:00 2001 From: Konstantin Kolosovsky Date: Thu, 27 Apr 2017 20:00:14 +0300 Subject: [PATCH] Do not load inspection description while highlighting inspection problems This commit reverts 9371b2211e6c590ed6e845fcf2f16da7c26df2ed. It is unnecessary to load inspection description without explicit request because it is rarely needed. And original commit also breaks "SpellcheckerPerformanceTest.testLargeTextFileWithManyTypos()". --- .../daemon/impl/LocalInspectionsPass.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java index f8f08fa4b0a3..51246fecf945 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,8 +71,6 @@ import java.util.*; import java.util.concurrent.ConcurrentMap; import java.util.function.Function; -import static com.intellij.openapi.util.text.StringUtil.isEmpty; - /** * @author max */ @@ -556,14 +554,11 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass HighlightInfoType type = new HighlightInfoType.HighlightInfoTypeImpl(level.getSeverity(element), level.getAttributesKey()); final String plainMessage = message.startsWith("") ? StringUtil.unescapeXml(XmlStringUtil.stripHtml(message).replaceAll("<[^>]*>", "")) : message; - @NonNls String link = ""; - if (!isEmpty(tool.loadDescription())) { - link = " " + DaemonBundle.message("inspection.extended.description") - + " " + myShortcutText; - } + @NonNls final String link = " " + DaemonBundle.message("inspection.extended.description") + +" " + myShortcutText; @NonNls String tooltip = null; if (descriptor.showTooltip()) {