From 35b2c17635819de18784fd970e3326fbbe2f6e1c Mon Sep 17 00:00:00 2001 From: "Anna.Kozlova" Date: Fri, 13 Oct 2017 12:40:51 +0200 Subject: [PATCH] provide fixes in no highlighting mode from global tools with paired local (IDEA-180553) --- .../intellij/codeInsight/daemon/impl/ShowIntentionsPass.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java index 72ccb8abc76a..00ce31ba70d4 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java @@ -30,6 +30,7 @@ import com.intellij.codeInsight.intention.impl.config.IntentionManagerSettings; import com.intellij.codeInsight.template.impl.TemplateManagerImpl; import com.intellij.codeInsight.template.impl.TemplateState; import com.intellij.codeInspection.*; +import com.intellij.codeInspection.ex.GlobalInspectionToolWrapper; import com.intellij.codeInspection.ex.InspectionToolWrapper; import com.intellij.codeInspection.ex.LocalInspectionToolWrapper; import com.intellij.codeInspection.ex.QuickFixWrapper; @@ -406,6 +407,9 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass { final InspectionProfile profile = InspectionProjectProfileManager.getInstance(project).getInspectionProfile(); final InspectionToolWrapper[] tools = profile.getInspectionTools(hostFile); for (InspectionToolWrapper toolWrapper : tools) { + if (toolWrapper instanceof GlobalInspectionToolWrapper) { + toolWrapper = ((GlobalInspectionToolWrapper)toolWrapper).getSharedLocalInspectionToolWrapper(); + } if (toolWrapper instanceof LocalInspectionToolWrapper && !((LocalInspectionToolWrapper)toolWrapper).isUnfair()) { final HighlightDisplayKey key = HighlightDisplayKey.find(toolWrapper.getShortName()); if (profile.isToolEnabled(key, hostFile) &&