mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not check for disabled in unused declaration inspection settings entry points: check implicit usages only
This commit is contained in:
+1
-1
@@ -442,8 +442,8 @@ public class UnusedDeclarationInspection extends FilteringInspectionTool {
|
||||
}
|
||||
|
||||
private boolean isEntryPoint(final RefElement owner) {
|
||||
if (RefUtil.isEntryPoint(owner)) return true;
|
||||
final PsiElement element = owner.getElement();
|
||||
if (RefUtil.isImplicitUsage(element)) return true;
|
||||
if (element instanceof PsiModifierListOwner) {
|
||||
final EntryPointsManagerImpl entryPointsManager = EntryPointsManagerImpl.getInstance(element.getProject());
|
||||
if (AnnotationUtil.isAnnotated((PsiModifierListOwner)element, entryPointsManager.ADDITIONAL_ANNOTATIONS) ||
|
||||
|
||||
@@ -42,6 +42,10 @@ public abstract class RefUtil {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return isImplicitUsage(element);
|
||||
}
|
||||
|
||||
public static boolean isImplicitUsage(PsiElement element) {
|
||||
final ImplicitUsageProvider[] implicitUsageProviders = Extensions.getExtensions(ImplicitUsageProvider.EP_NAME);
|
||||
for (ImplicitUsageProvider provider : implicitUsageProviders) {
|
||||
if (provider.isImplicitUsage(element)) return true;
|
||||
|
||||
Reference in New Issue
Block a user