@Override
  protected void doAction(@NotNull DataContext dataContext, final Project project) {
    ProjectTaskManager.getInstance(project)
      .rebuildAllModules()
      .onSuccess(result -> {
        if (!result.isAborted() && !project.isDisposed()) {
          String text = getTemplatePresentation().getText();
          LocalHistory.getInstance().putSystemLabel(
            project, JavaCompilerBundle.message(result.hasErrors() ? "rebuild.lvcs.label.with.errors" : "rebuild.lvcs.label.no.errors", text));
        }
      });
  }
@Override
  protected void doAction(@NotNull DataContext dataContext, final Project project)