private Map<ProblemDescriptor, HighlightDisplayLevel> runXmlFileSchemaValidation(@NotNull XmlFile xmlFile) {
    Map<ProblemDescriptor, HighlightDisplayLevel> problemsMap = new LinkedHashMap<>();
    List<ExternalAnnotator<?, ?>> annotators = ExternalLanguageAnnotators.allForFile(XMLLanguage.INSTANCE, xmlFile);
    for (ExternalAnnotator<?, ?> annotator : annotators) {
      AnnotationSessionImpl.computeWithSession(xmlFile, false, annotator, annotationHolder -> {
        processAnnotator(xmlFile, ((AnnotationHolderImpl)annotationHolder), annotator);
        for (Annotation annotation : ((AnnotationHolderImpl)annotationHolder)) {
          HighlightInfo info = HighlightInfo.fromAnnotation(annotator, annotation);
          if (info.getSeverity() == HighlightSeverity.INFORMATION) continue;

          PsiElement startElement = xmlFile.findElementAt(info.startOffset);
          PsiElement endElement = info.startOffset == info.endOffset ? startElement : xmlFile.findElementAt(info.endOffset - 1);
          if (startElement == null || endElement == null) continue;

          ProblemDescriptor descriptor =
            myInspectionManager.createProblemDescriptor(startElement, endElement, info.getDescription(),
                                                        ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
                                                        false);
          HighlightDisplayLevel level =
            info.getSeverity() == HighlightSeverity.ERROR ? HighlightDisplayLevel.ERROR : HighlightDisplayLevel.WARNING;
          problemsMap.put(descriptor, level);
        }
        ((AnnotationHolderImpl)annotationHolder).assertAllAnnotationsCreated();
        return null;
      });
    }
    if (problemsMap.isEmpty()) return Collections.emptyMap();
    return problemsMap;
  }
private Map<ProblemDescriptor, HighlightDisplayLevel> runXmlFileSchemaValidation(@NotNull XmlFile xmlFile)