public static void addDirectoriesWithUndo(@NotNull Project project, @NotNull List<? extends VirtualFile> roots) {
    Module module = getAttachTargetModule(project);
    if (module == null) return;
    addAndSelectDirectoriesWithUndo(project, module, roots);
  }
public static void addDirectoriesWithUndo(@NotNull Project project, @NotNull List<? extends VirtualFile> roots)