mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
unused declaration: don't filter entry points from dummy node, register method patterns as persistent entry points (IDEA-160808)
This commit is contained in:
+5
@@ -105,6 +105,11 @@ public class DummyEntryPointsPresentation extends UnusedDeclarationPresentation
|
||||
return node;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean skipEntryPoints(RefJavaElement refElement) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public DeadHTMLComposer getComposer() {
|
||||
|
||||
+6
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user