private static void annotateComponent(Component component,
                                        DomElementAnnotationHolder holder) {
    GenericDomValue<PsiClass> implementationClassElement = component.getImplementationClass();
    PsiClass implementationClass = implementationClassElement.getValue();
    if (implementationClass != null) {
      if (implementationClass.hasModifierProperty(PsiModifier.ABSTRACT)) {
        holder.createProblem(implementationClassElement,
                             DevKitBundle.message("inspections.registration.problems.abstract"));
      }
    }

    GenericDomValue<PsiClass> interfaceClassElement = component.getInterfaceClass();
    PsiClass interfaceClass = interfaceClassElement.getValue();
    if (interfaceClass != null) {
      if (interfaceClass.equals(implementationClass) && component.getHeadlessImplementationClass().getValue() == null) {
        highlightRedundant(interfaceClassElement,
                           DevKitBundle.message("inspections.plugin.xml.component.interface.class.redundant"),
                           ProblemHighlightType.WARNING, holder);
      }
      IdeaPlugin plugin = component.getParentOfType(IdeaPlugin.class, false);
      if (plugin != null) {
        DuplicateComponentInterfaceChecker checker = new DuplicateComponentInterfaceChecker(component, interfaceClass);
        plugin.accept(checker);
        if (checker.declarationBeforeComponentFound) {
          holder.createProblem(interfaceClassElement,
                               DevKitBundle.message("inspections.registration.problems.component.duplicate.interface",
                                                    interfaceClass.getQualifiedName()));
        }
      }
    }

    if (implementationClass != null && interfaceClass != null &&
        implementationClass != interfaceClass && !implementationClass.isInheritor(interfaceClass, true)) {
      holder.createProblem(implementationClassElement,
                           DevKitBundle.message("inspections.registration.problems.component.incompatible.interface",
                                                interfaceClass.getQualifiedName()));
    }
  }
private static void annotateComponent(Component component,
                                        DomElementAnnotationHolder holder)