void (@NotNull Project project, @NotNull PsiClass checkedClass, @NotNull HighlightSink sink) { if (checkedClass.getQualifiedName() == null || checkedClass.getContainingFile().getVirtualFile() == null || checkedClass.hasModifierProperty(PsiModifier.ABSTRACT) || checkedClass.isEnum() || checkedClass.isDeprecated() || PsiUtil.isInnerClass(checkedClass) || !shouldCheckActionClass(checkedClass)) { return; } GlobalSearchScope scope = checkedClass.getResolveScope(); PsiClass actionClass = JavaPsiFacade.getInstance(project).findClass(AnAction.class.getName(), scope); if (actionClass == null) { // stop if action class cannot be found (non-devkit module/project) return; } if (checkedClass.isInheritor(actionClass, true)) { if (!isActionRegistered(checkedClass) && canFix(checkedClass)) { LocalQuickFix fix = new RegisterActionFix(checkedClass); sink.highlight(DevKitBundle.message("inspections.component.not.registered.message", DevKitBundle.message("new.menu.action.text")), fix); } // action IS registered, stop here return; } //noinspection deprecation PsiClass baseComponentClass = JavaPsiFacade.getInstance(project).findClass(BaseComponent.class.getName(), scope); if (baseComponentClass == null) { // stop if component class cannot be found (non-devkit module/project) return; } // if directly implements BaseComponent, check that registered as some component if (checkedClass.isInheritor(baseComponentClass, false)) { if (findRegistrationType(checkedClass, RegistrationCheckerUtil.RegistrationType.ALL_COMPONENTS) == null && canFix(checkedClass)) { sink.highlight(DevKitBundle.message("inspections.component.not.registered.message", "Component")); //NON-NLS } return; } if (!checkedClass.isInheritor(baseComponentClass, true)) { return; } for (ComponentType componentType : ComponentType.values()) { if (InheritanceUtil.isInheritor(checkedClass, componentType.myClassName) && checkComponentRegistration(checkedClass, sink, componentType)) { return; } } }