@NotNull
  public static List<PsiDirectory> collectProjectDirectories(@NotNull Project project) {
    List<PsiDirectory> directories = new ArrayList<>();

    Module[] modules = ModuleManager.getInstance(project).getModules();
    for (Module module : modules) {
      directories.addAll(collectModuleDirectories(module));
    }

    return directories;
  }
@NotNull
  public static List<PsiDirectory> collectProjectDirectories(@NotNull Project project)