diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonTooltipRendererProvider.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonTooltipRendererProvider.java index 694c0006cf2d..f5793a808b9a 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonTooltipRendererProvider.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonTooltipRendererProvider.java @@ -47,6 +47,8 @@ import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class DaemonTooltipRendererProvider implements ErrorStripTooltipRendererProvider { private final Project myProject; @@ -141,8 +143,16 @@ public class DaemonTooltipRendererProvider implements ErrorStripTooltipRendererP final String descriptionPrefix = getDescriptionPrefix(problem); if (descriptionPrefix != null) { for (final TooltipLinkHandlerEP handlerEP : Extensions.getExtensions(TooltipLinkHandlerEP.EP_NAME)) { - final String description = handlerEP.getDescription(descriptionPrefix, editor); + String description = handlerEP.getDescription(descriptionPrefix, editor); if (description != null) { + final Pattern pattern = Pattern.compile(".*Use.*(the (panel|checkbox|checkboxes|field|button|controls).*below).*", Pattern.DOTALL); + final Matcher matcher = pattern.matcher(description); + int startFindIdx = 0; + while (matcher.find(startFindIdx)) { + final int end = matcher.end(1); + startFindIdx = end; + description = description.substring(0, matcher.start(1)) + " inspection settings " + description.substring(end); + } text += IdeTooltipManager.getHtmlBody(problem).replace(DaemonBundle.message("inspection.extended.description"), DaemonBundle.message("inspection.collapse.description")) + BORDER_LINE + IdeTooltipManager .getHtmlBody(description) + BORDER_LINE; diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldCount.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldCount.html index 29249e533a49..7a4d8167600e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldCount.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldCount.html @@ -5,9 +5,9 @@ This inspection reports any instances of class with too many fields. Classes wi a large number of fields are often trying to 'do too much', and may need to be refactored into multiple smaller classes.
-Use the controls provided below to specify the maximum acceptable number of fields a class might have, and +Use the controls below to specify the maximum acceptable number of fields a class might have, and to indicate whether constant fields count toward this number. Per default this inspection only counts -immutable static final objects as constant. Use the bottom checkbox to +immutable static final objects as constant. Use the checkbox below to count any static final field as constant.