void generate(@NotNull List<ModuleFiles> moduleFiles, @NotNull ProgressIndicator indicator) {
    myProgressTracker.init(indicator);
    List<ModuleInfo> modulesInfos;
    try {
      myProgressTracker.startPhase(JavaRefactoringBundle.message("generate.module.descriptors.collecting.message"),
                                   moduleFiles.stream().mapToInt(m -> m.files().size()).sum());
      Map<String, Set<ModuleNode>> packagesDeclaredInModules = collectDependencies(moduleFiles);
      myProgressTracker.nextPhase();

      final int modulesCount = packagesDeclaredInModules.values().stream().mapToInt(Set::size).sum();

      myProgressTracker.startPhase(JavaRefactoringBundle.message("generate.module.descriptors.analysing.message"), modulesCount);
      final Set<ModuleNode> modules = prepareModulesWithDependencies(packagesDeclaredInModules);
      myProgressTracker.nextPhase();

      myProgressTracker.startPhase(JavaRefactoringBundle.message("generate.module.descriptors.preparing.message"), modulesCount);
      modulesInfos = prepareModuleInfos(modules);
      myProgressTracker.nextPhase();
    }
    finally {
      myProgressTracker.dispose();
    }
    createFilesLater(modulesInfos);
  }
void generate(@NotNull List<ModuleFiles> moduleFiles, @NotNull ProgressIndicator indicator)