diff --git a/java/java-impl/src/com/intellij/codeInspection/deadCode/DummyEntryPointsPresentation.java b/java/java-impl/src/com/intellij/codeInspection/deadCode/DummyEntryPointsPresentation.java index 0aac8ceb56c6..fc4b3affa993 100644 --- a/java/java-impl/src/com/intellij/codeInspection/deadCode/DummyEntryPointsPresentation.java +++ b/java/java-impl/src/com/intellij/codeInspection/deadCode/DummyEntryPointsPresentation.java @@ -105,6 +105,11 @@ public class DummyEntryPointsPresentation extends UnusedDeclarationPresentation return node; } + @Override + protected boolean skipEntryPoints(RefJavaElement refElement) { + return false; + } + @Override @NotNull public DeadHTMLComposer getComposer() { diff --git a/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationPresentation.java b/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationPresentation.java index 0ca6b7db7e20..3988ee7e4a59 100644 --- a/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationPresentation.java +++ b/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationPresentation.java @@ -157,7 +157,7 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta if (!refEntity.isValid()) return; RefJavaElement refElement = (RefJavaElement)refEntity; if (!compareVisibilities(refElement, getTool().getSharedLocalInspectionTool())) return; - if (getTool().isEntryPoint(refElement)) return; + if (skipEntryPoints(refElement)) return; Element element = refEntity.getRefManager().export(refEntity, parentNode, -1); if (element == null) return; @@ -460,7 +460,7 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta RefJavaElement refElement = (RefJavaElement)refEntity; if (!compareVisibilities(refElement, localInspectionTool)) return; if (!(getContext().getUIOptions().FILTER_RESOLVED_ITEMS && getIgnoredRefElements().contains(refElement)) && refElement.isValid() && getFilter().accepts(refElement)) { - if (getTool().isEntryPoint(refElement)) return; + if (skipEntryPoints(refElement)) return; registerContentEntry(refEntity, RefJavaUtil.getInstance().getPackageName(refEntity)); } } @@ -468,6 +468,10 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta updateProblemElements(); } + protected boolean skipEntryPoints(RefJavaElement refElement) { + return getTool().isEntryPoint(refElement); + } + @PsiModifier.ModifierConstant private static String getAcceptedVisibility(UnusedSymbolLocalInspectionBase tool, RefJavaElement element) { if (element instanceof RefImplicitConstructor) {