public <T extends DomElement> void runInspection(@NotNull DomElementsInspection<DomElement> inspection,
                                                   @NotNull DomFileElement<DomElement> fileElement,
                                                   @NotNull AnnotationHolder toFill) {
    DomElementAnnotationsManagerImpl annotationsManager = getAnnotationsManager(fileElement.getFile().getProject());
    if (annotationsManager.isHolderUpToDate(fileElement) && annotationsManager.getProblemHolder(fileElement).isInspectionCompleted(inspection)) {
      return;
    }

    DomElementAnnotationHolderImpl annotationHolder = new DomElementAnnotationHolderImpl(true, fileElement, toFill);
    inspection.checkFileElement(fileElement, annotationHolder);
    //noinspection unchecked
    List<DomElementProblemDescriptor> problemDescriptors =
      annotationsManager.appendProblems(fileElement, annotationHolder, (Class<? extends DomElementsInspection<?>>)inspection.getClass());

    for (final DomElementProblemDescriptor descriptor : problemDescriptors) {
      DomElementsHighlightingUtil.createProblemDescriptors(descriptor, s -> {
        AnnotationBuilder builder = toFill.newAnnotation(descriptor.getHighlightSeverity(), descriptor.getDescriptionTemplate())
          .range(s.first.shiftRight(s.second.getTextOffset()));

        ProblemDescriptor problemDescriptor = ContainerUtil.getFirstItem(annotationsManager.createProblemDescriptors(
          InspectionManager.getInstance(fileElement.getFile().getProject()), descriptor));

        LocalQuickFix[] fixes = descriptor.getFixes();
        if (problemDescriptor != null && fixes != null) {
          for (LocalQuickFix fix : fixes) {
            builder = builder.newLocalQuickFix(fix, problemDescriptor).registerFix();
          }
        }
        builder.create();
        return null;
      });
    }
  }
public <T extends DomElement> void runInspection(@NotNull DomElementsInspection<DomElement> inspection,
                                                   @NotNull DomFileElement<DomElement> fileElement,
                                                   @NotNull AnnotationHolder toFill)