mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
replace use blah-bla below with use inspection settings (IDEA-59499)
This commit is contained in:
+11
-1
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
<p>
|
||||
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 <b><font color="#000080">static final</font></b> objects as constant. Use the bottom checkbox to
|
||||
immutable <b><font color="#000080">static final</font></b> objects as constant. Use the checkbox below to
|
||||
count any <b><font color="#000080">static final</font></b> field as constant.
|
||||
</font></td> </tr> <tr> <td height="20"> <font face="verdana" size="-2">Powered by InspectionGadgets </font> </td> </tr> </table> </body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user