protected ProblemDescriptor @Nullable [] checkDomFile(final @NotNull DomFileElement<T> domFileElement,
                                                        final @NotNull InspectionManager manager,
                                                        final boolean isOnTheFly) {
    final DomElementAnnotationsManager annotationsManager = DomElementAnnotationsManager.getInstance(manager.getProject());

    final List<DomElementProblemDescriptor> list = annotationsManager.checkFileElement(domFileElement, this, isOnTheFly);
    if (list.isEmpty()) return ProblemDescriptor.EMPTY_ARRAY;

    List<ProblemDescriptor> problems =
      ContainerUtil.concat(list, s -> annotationsManager.createProblemDescriptors(manager, s));
    return problems.toArray(ProblemDescriptor.EMPTY_ARRAY);
  }
protected ProblemDescriptor @Nullable [] checkDomFile(final @NotNull DomFileElement<T> domFileElement,
                                                        final @NotNull InspectionManager manager,
                                                        final boolean isOnTheFly)