static boolean confirmClose(@NotNull @NlsContexts.DialogMessage String message,
                              @NotNull @NlsContexts.DialogTitle String title,
                              @NotNull LightEditSaveConfirmationHandler handler) {
    final String[] options = {getCloseSave(), getCloseDiscard(), getCloseCancel()};
    int result = Messages.showDialog(requireProject(), message, title, options, 0, Messages.getWarningIcon());
    if (result >= 0) {
      if (getCloseCancel().equals(options[result])) {
        return false;
      }
      else if (getCloseSave().equals(options[result])) {
        handler.onSave();
      }
      else if (getCloseDiscard().equals(options[result])){
        handler.onDiscard();
      }
      return true;
    }
    else {
      return false;
    }
  }
static boolean confirmClose(@NotNull @NlsContexts.DialogMessage String message,
                              @NotNull @NlsContexts.DialogTitle String title,
                              @NotNull LightEditSaveConfirmationHandler handler)