void (@NotNull Project project) { ApplicationManager.getApplication().assertIsNonDispatchThread(); if (!isNewVersionAvailable()) return; Notification notification = NOTIFICATION_GROUP.createNotification(message("sh.shell.script"), message("sh.fmt.update.question"), NotificationType.INFORMATION); notification.setSuggestionType(true); notification.setDisplayId(ShNotificationDisplayIds.UPDATE_FORMATTER); notification.addAction( NotificationAction.createSimple(messagePointer("sh.update"), () -> { notification.expire(); download(project, () -> Notifications.Bus .notify(NOTIFICATION_GROUP.createNotification(message("sh.shell.script"), message("sh.fmt.success.update"), NotificationType.INFORMATION) .setDisplayId(ShNotificationDisplayIds.UPDATE_FORMATTER_SUCCESS)), () -> Notifications.Bus .notify(NOTIFICATION_GROUP.createNotification(message("sh.shell.script"), message("sh.fmt.cannot.update"), NotificationType.ERROR) .setDisplayId(ShNotificationDisplayIds.UPDATE_FORMATTER_ERROR)), true); })); notification.addAction(NotificationAction.createSimple(messagePointer("sh.skip.version"), () -> { notification.expire(); ShSettings.setSkippedShfmtVersion(SHFMT_VERSION); })); Notifications.Bus.notify(notification, project); }