@Override
  public void checkFile(@NotNull PsiFile file,
                        @NotNull InspectionManager manager,
                        @NotNull ProblemsHolder ignored,
                        @NotNull GlobalInspectionContext globalContext,
                        @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor) {
    if (!file.getLanguage().isKindOf("JAVA")) return;
    // don't use supplied problems holder to get nice warnings attached to members instead of anchored at the file level
    ProblemsHolder problemsHolder = new ProblemsHolder(manager, file, false);
    PsiElementVisitor visitor = myLocalInspectionBase.buildVisitor(problemsHolder, false);
    file.accept(new PsiRecursiveElementWalkingVisitor() {
      @Override
      public void visitElement(@NotNull PsiElement element) {
        element.accept(visitor);
        super.visitElement(element);
      }
    });
    for (ProblemDescriptor problemDescriptor : problemsHolder.getResults()) {
      PsiElement psiElement = problemDescriptor.getPsiElement();
      if (psiElement != null) {
        PsiElement member = globalContext.getRefManager().getContainerElement(psiElement);
        RefElement reference = globalContext.getRefManager().getReference(member);
        if (reference != null) {
          problemDescriptionsProcessor.addProblemElement(reference, problemDescriptor);
        }
      }
    }
  }
@Override
  public void checkFile(@NotNull PsiFile file,
                        @NotNull InspectionManager manager,
                        @NotNull ProblemsHolder ignored,
                        @NotNull GlobalInspectionContext globalContext,
                        @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor)