mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
unused declaration: remove problems count from view (IDEA-160870)
This commit is contained in:
+5
@@ -684,4 +684,9 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta
|
||||
SingleInspectionProfilePanel.readHTML(htmlView, SingleInspectionProfilePanel.toHTML(htmlView, text, false));
|
||||
return ScrollPaneFactory.createScrollPane(htmlView, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProblemsCount(InspectionTree tree) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,4 +114,8 @@ public interface InspectionToolPresentation extends ProblemDescriptionsProcessor
|
||||
default boolean isDummy() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default int getProblemsCount(InspectionTree tree) {
|
||||
return tree.getSelectedDescriptors().length;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ public class QuickFixPreviewPanelFactory {
|
||||
setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
|
||||
boolean hasComponents = false;
|
||||
|
||||
final int actualProblemCount = myView.getTree().getSelectedDescriptors().length;
|
||||
final int actualProblemCount = myView.getTree().getContext().getPresentation(myWrapper).getProblemsCount(myView.getTree());
|
||||
if (actualProblemCount > 1 || (actualProblemCount == 1 && problemCount > 1)) {
|
||||
add(getLabel(actualProblemCount));
|
||||
hasComponents = true;
|
||||
|
||||
Reference in New Issue
Block a user