public void registerProblem(@NotNull PsiElement psiElement,
                              @NotNull @InspectionMessage String descriptionTemplate,
                              @NotNull ProblemHighlightType highlightType,
                              @NotNull LocalQuickFix @Nullable ... fixes) {
    registerProblem(myManager.createProblemDescriptor(psiElement, descriptionTemplate, myOnTheFly, fixes, highlightType));
  }

  public void registerProblem(@NotNull ProblemDescriptor problemDescriptor) {
    PsiElement element = problemDescriptor.getPsiElement();
    if (element != null && !isInPsiFile(element)) {
      ExternallyDefinedPsiElement external = PsiTreeUtil.getParentOfType(element, ExternallyDefinedPsiElement.class, false);
      if (external != null) {
        PsiElement newTarget = external.getProblemTarget();
        if (newTarget != null) {
          redirectProblem(problemDescriptor, newTarget);
          return;
        }
      }
    }

    saveProblem(problemDescriptor);
  }
public void registerProblem(@NotNull PsiElement psiElement,
                              @NotNull @InspectionMessage String descriptionTemplate,
                              @NotNull ProblemHighlightType highlightType,
                              @NotNull LocalQuickFix @Nullable ... fixes) {
    registerProblem(myManager.createProblemDescriptor(psiElement, descriptionTemplate, myOnTheFly, fixes, highlightType));
  }

  public void registerProblem(@NotNull ProblemDescriptor problemDescriptor)