void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) return; CompilerManager compilerManager = CompilerManager.getInstance(project); CompileScope scope = compilerManager.createProjectCompileScope(project); if (!compilerManager.isUpToDate(scope)) { int result = Messages.showYesNoCancelDialog( project, JavaRefactoringBundle.message("generate.module.descriptors.rebuild.message"), getTitle(), null); if (result == Messages.CANCEL) { return; } if (result == Messages.YES) { compilerManager.compile(scope, (aborted, errors, warnings, compileContext) -> { if (!aborted && errors == 0) { generate(project); } }); return; } } generate(project); }