diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfo.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfo.java index ec326181e114..80d096aeaa73 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfo.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfo.java @@ -74,7 +74,7 @@ public class HighlightInfo implements Segment { private final HighlightSeverity severity; private final GutterMark gutterIconRenderer; private final ProblemGroup myProblemGroup; - private final String inspectionGroupKey; + private final String inspectionToolId; private int group; private int fixStartOffset; @@ -143,8 +143,8 @@ public class HighlightInfo implements Segment { } @Nullable - public String getInspectionGroupKey() { - return inspectionGroupKey; + public String getInspectionToolId() { + return inspectionToolId; } private boolean isFlagSet(@FlagConstant byte mask) { @@ -283,7 +283,7 @@ public class HighlightInfo implements Segment { boolean isFileLevelAnnotation, int navigationShift, ProblemGroup problemGroup, - @Nullable String inspectionGroupKey, + @Nullable String inspectionToolId, GutterMark gutterIconRenderer) { if (startOffset < 0 || startOffset > endOffset) { LOG.error("Incorrect highlightInfo bounds. description="+escapedDescription+"; startOffset="+startOffset+"; endOffset="+endOffset+";type="+type); @@ -305,7 +305,7 @@ public class HighlightInfo implements Segment { this.navigationShift = navigationShift; myProblemGroup = problemGroup; this.gutterIconRenderer = gutterIconRenderer; - this.inspectionGroupKey = inspectionGroupKey; + this.inspectionToolId = inspectionToolId; } private static boolean calcNeedUpdateOnTyping(@Nullable Boolean needsUpdateOnTyping, HighlightInfoType type) { @@ -391,7 +391,7 @@ public class HighlightInfo implements Segment { @NotNull Builder gutterIconRenderer(@NotNull GutterIconRenderer gutterIconRenderer); @NotNull Builder problemGroup(@NotNull ProblemGroup problemGroup); - @NotNull Builder inspectionGroupKey(@Nullable String groupKey); + @NotNull Builder inspectionToolId(@NotNull String inspectionTool); // only one allowed @NotNull Builder description(@NotNull String description); @@ -448,7 +448,7 @@ public class HighlightInfo implements Segment { private GutterIconRenderer gutterIconRenderer; private ProblemGroup problemGroup; - private String inspectionGroupKey; + private String inspectionToolId; private PsiElement psiElement; private B(@NotNull HighlightInfoType type) { @@ -473,9 +473,9 @@ public class HighlightInfo implements Segment { @NotNull @Override - public Builder inspectionGroupKey(@Nullable String groupKey) { - assert this.inspectionGroupKey == null : "inspectionGroupKey already set"; - this.inspectionGroupKey = groupKey; + public Builder inspectionToolId(@NotNull String inspectionToolId) { + assert this.inspectionToolId == null : "inspectionToolId already set"; + this.inspectionToolId = inspectionToolId; return this; } @@ -634,7 +634,7 @@ public class HighlightInfo implements Segment { return new HighlightInfo(forcedTextAttributes, forcedTextAttributesKey, type, startOffset, endOffset, escapedDescription, escapedToolTip, severity, isAfterEndOfLine, myNeedsUpdateOnTyping, isFileLevelAnnotation, navigationShift, - problemGroup, inspectionGroupKey, gutterIconRenderer); + problemGroup, inspectionToolId, gutterIconRenderer); } } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedGeneralHighlightingPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedGeneralHighlightingPass.java index 3f85a5947dbe..c2a374c9d7ab 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedGeneralHighlightingPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedGeneralHighlightingPass.java @@ -256,7 +256,7 @@ public class InjectedGeneralHighlightingPass extends GeneralHighlightingPass { info.type, fixedTextRange.getStartOffset(), fixedTextRange.getEndOffset(), info.getDescription(), info.getToolTip(), info.type.getSeverity(null), - info.isAfterEndOfLine(), null, false, 0, info.getProblemGroup(), info.getInspectionGroupKey(), info.getGutterIconRenderer()); + info.isAfterEndOfLine(), null, false, 0, info.getProblemGroup(), info.getInspectionToolId(), info.getGutterIconRenderer()); patched.setFromInjection(true); outInfos.add(patched); } @@ -319,7 +319,7 @@ public class InjectedGeneralHighlightingPass extends GeneralHighlightingPass { new HighlightInfo(info.forcedTextAttributes, info.forcedTextAttributesKey, info.type, hostRange.getStartOffset(), hostRange.getEndOffset(), info.getDescription(), info.getToolTip(), info.type.getSeverity(null), isAfterEndOfLine, null, - false, 0, info.getProblemGroup(), info.getInspectionGroupKey(), info.getGutterIconRenderer()); + false, 0, info.getProblemGroup(), info.getInspectionToolId(), info.getGutterIconRenderer()); patched.setHint(info.hasHint()); if (info.quickFixActionRanges != null) { 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 d5d59fdec6de..593fa29e122e 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 @@ -403,7 +403,7 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass .range(psiElement, textRange.getStartOffset(), textRange.getEndOffset()) .description(message) .severity(severity) - .inspectionGroupKey(tool.getGroupKey()); + .inspectionToolId(tool.getID()); if (toolTip != null) b.escapedToolTip(toolTip); if (HighlightSeverity.INFORMATION.equals(severity) && attributes == null && toolTip == null && !quickFixes.isEmpty()) { // Hack to avoid filtering this info out in HighlightInfoFilterImpl even though its attributes are empty.