@Override
  public ProblemDescriptor @Nullable [] checkFile(@NotNull PsiFile file, @NotNull InspectionManager manager, boolean isOnTheFly) {
    if (!PsiUtil.isAvailable(JavaFeature.MODULES, file)) return ProblemDescriptor.EMPTY_ARRAY;
    if (!file.getName().equals(MODULE_INFO_FILE)) return ProblemDescriptor.EMPTY_ARRAY;
    if (!(file instanceof PsiJavaFile javaFile)) return ProblemDescriptor.EMPTY_ARRAY;

    PsiJavaModule descriptor = javaFile.getModuleDeclaration();
    if (descriptor == null) return ProblemDescriptor.EMPTY_ARRAY;

    if (!isEmptyModule(descriptor)) return ProblemDescriptor.EMPTY_ARRAY;
    if (!needRequires(descriptor)) return ProblemDescriptor.EMPTY_ARRAY;

    ProblemDescriptor problemDescriptor = manager.createProblemDescriptor(
      file,
      JavaBundle.message("inspection.unresolved.module.dependencies.problem.descriptor"),
      isOnTheFly,
      LocalQuickFix.notNullElements(new GenerateModuleInfoRequiresFix()),
      ProblemHighlightType.WARNING
    );
    return new ProblemDescriptor[]{problemDescriptor};
  }
@Override
  public ProblemDescriptor @Nullable [] checkFile(@NotNull PsiFile file, @NotNull InspectionManager manager, boolean isOnTheFly)