void (Project project, List<ModuleInfo> moduleInfos, ProgressIndicator indicator) { indicator.setIndeterminate(false); int count = 0; double total = moduleInfos.size(); FileTemplate template = FileTemplateManager.getInstance(project).getInternalTemplate(INTERNAL_MODULE_INFO_TEMPLATE_NAME); for (ModuleInfo moduleInfo : moduleInfos) { ProgressManager.getInstance().executeNonCancelableSection(() -> createFile(template, moduleInfo)); indicator.setFraction(++count / total); } }