private void annotateExtensionPointStatus(DomElementAnnotationHolder holder,
                                            Extension extension,
                                            ExtensionPoint extensionPoint,
                                            String effectiveQualifiedName,
                                            @Nullable Module module) {
    final ExtensionPoint.Status status = extensionPoint.getExtensionPointStatus();
    ExtensionPoint.Status.Kind kind = status.getKind();
    if (kind == ExtensionPoint.Status.Kind.SCHEDULED_FOR_REMOVAL_API) {
      final String inVersion = status.getAdditionalData();
      String message = inVersion == null ?
                       DevKitBundle.message("inspections.plugin.xml.deprecated.ep.marked.for.removal",
                                            effectiveQualifiedName) :
                       DevKitBundle.message("inspections.plugin.xml.deprecated.ep.marked.for.removal.in.version",
                                            effectiveQualifiedName, inVersion);
      highlightDeprecatedMarkedForRemoval(extension, message, holder, false);
    }
    else if (kind == ExtensionPoint.Status.Kind.DEPRECATED) {
      highlightDeprecated(
        extension, DevKitBundle.message("inspections.plugin.xml.deprecated.ep", effectiveQualifiedName),
        holder, false, false);
    }
    else if (kind == ExtensionPoint.Status.Kind.ADDITIONAL_DEPRECATED && module != null) {
      final String knownReplacementEp = status.getAdditionalData();
      if (knownReplacementEp == null) {
        highlightDeprecated(
          extension, DevKitBundle.message("inspections.plugin.xml.deprecated.ep", effectiveQualifiedName),
          holder, false, false);
      }
      else if (ExtensionPointIndex.findExtensionPoint(module, knownReplacementEp) != null) {
        highlightDeprecated(
          extension,
          DevKitBundle.message("inspections.plugin.xml.deprecated.ep.use.replacement", effectiveQualifiedName, knownReplacementEp),
          holder, false, false);
      }
    }
    else if (kind == ExtensionPoint.Status.Kind.OBSOLETE) {
      highlightObsolete(extension, holder);
    }
    else if (kind == ExtensionPoint.Status.Kind.EXPERIMENTAL_API) {
      if (module != null) {
        boolean fromSameProject = Optional.ofNullable(extension.getExtensionPoint())
          .map(ExtensionPoint::getEffectiveClass)
          .map(PsiElement::getContainingFile)
          .map(PsiFile::getVirtualFile)
          .map(file -> projectScope(module.getProject()).contains(file))
          .orElse(false);

        if (!myIgnoreUnstableApiDeclaredInThisProject || !fromSameProject) {
          highlightExperimental(extension, holder);
        }
      }
      else {
        highlightExperimental(extension, holder);
      }
    }
    else {
      if (kind == ExtensionPoint.Status.Kind.INTERNAL_API &&
          module != null && !IntelliJProjectUtil.isIntelliJPlatformProject(module.getProject())) {
          highlightInternal(extension, holder);
      }
    }
  }
private void annotateExtensionPointStatus(DomElementAnnotationHolder holder,
                                            Extension extension,
                                            ExtensionPoint extensionPoint,
                                            String effectiveQualifiedName,
                                            @Nullable Module module)