Ejemplo n.º 1
0
 /**
  * Possibly shows a notification or an error dialog depending on {@code success} and {@code
  * isUndo}.
  *
  * @param issue the TurboIssue acted on
  * @param action the Action that acted on the issue
  * @param success whether the action was successful
  * @param isUndo whether action is an undo
  * @return {@code success}
  */
 private boolean handleActionResult(
     TurboIssue issue, Action<TurboIssue> action, Boolean success, boolean isUndo) {
   if (!success) {
     String errorMessage = "Please check if you have write permissions to " + issue.getRepoId();
     showErrorDialog(issue, action, errorMessage);
     return success;
   }
   if (!isUndo) {
     showNotification(issue.getId(), issue.getTitle(), action.getDescription());
     return success;
   }
   return success;
 }