void () { boolean unmergedCommits = !myUnmergedToBranches.isEmpty(); HtmlBuilder message = new HtmlBuilder().appendRaw(GitBundle.message("delete.branch.operation.deleted.branch.bold", myBranchName)); if (unmergedCommits) { message.br().append(GitBundle.message("delete.branch.operation.unmerged.commits.were.discarded")); } Notification notification = STANDARD_NOTIFICATION.createNotification(message.toString(), NotificationType.INFORMATION); notification.setDisplayId(GitNotificationIdsHolder.BRANCH_DELETED); notification.addAction(NotificationAction.createSimple(() -> getRestore(), () -> { notification.expire(); restoreInBackground(notification); })); if (unmergedCommits) { notification.addAction(NotificationAction.createSimple(() -> getViewCommits(), () -> viewUnmergedCommitsInBackground(notification))); } if (!myTrackedBranches.isEmpty() && hasNoOtherTrackingBranch(myTrackedBranches, myBranchName) && trackedBranchIsNotProtected()) { notification.addAction(NotificationAction.createSimple(() -> getDeleteTrackedBranch(), () -> { notification.expire(); deleteTrackedBranchInBackground(); })); } myNotifier.notify(notification); }