void (List<ModuleInfo> moduleInfos) { ApplicationManager.getApplication().invokeLater(() -> { if (!myProject.isDisposed()) { CommandProcessor.getInstance().executeCommand(myProject, () -> ((ApplicationEx)ApplicationManager.getApplication()).runWriteActionWithCancellableProgressInDispatchThread( getCommandTitle(), myProject, null, indicator -> createFiles(myProject, moduleInfos, indicator)), getCommandTitle(), null); } }); }