private static void processModule(@NotNull Project project,
                                    @NotNull Module module,
                                    @NotNull PsiDirectory directory,
                                    @NotNull Processor<? super PsiReference> consumer) {
    var projectsManager = MavenProjectsManager.getInstance(project);
    if (!projectsManager.isMavenizedModule(module)) return;
    var mavenProject = projectsManager.findProject(module);
    if (null == mavenProject) return;
    var pomFile = mavenProject.getFile();
    var mavenModel = ReadAction.compute(() -> MavenDomUtil.getMavenDomProjectModel(project, pomFile));
    if (null == mavenModel) return;
    var references = ReadAction.compute(() -> mavenModel.getModules().getModules().stream()
      .flatMap(mavenModule -> getPomTagReferencesToDirectory(mavenModule.getXmlTag(), pomFile, directory.getVirtualFile()).stream())
      .toList());
    for (var reference : references) {
      consumer.process(reference);
    }
  }
private static void processModule(@NotNull Project project,
                                    @NotNull Module module,
                                    @NotNull PsiDirectory directory,
                                    @NotNull Processor<? super PsiReference> consumer)