private static void notifyIfRestartRequired(boolean restartRequired) {
    if (!restartRequired) {
      return;
    }

    Notification notification = ourPreviousNotification.get();
    if (notification != null) {
      Balloon balloon = notification.getBalloon();
      if (balloon != null && !balloon.isDisposed()) {
        return;
      }
    }

    Notification newNotification = UpdateChecker.getNotificationGroupForIdeUpdateResults()
      .createNotification(
        IdeBundle.message("plugins.changed.notification.content", ApplicationNamesInfo.getInstance().getFullProductName()),
        NotificationType.INFORMATION)
      .setTitle(IdeBundle.message("plugins.changed.notification.title"))
      .setDisplayId("plugins.updated.restart.required")
      .addAction(new DumbAwareAction(IdeBundle.message("ide.restart.action")) {
        @Override
        public void actionPerformed(@NotNull AnActionEvent e) {
          ApplicationManager.getApplication().restart();
        }
      });

    if (ourPreviousNotification.compareAndSet(notification, newNotification)) {
      newNotification.notify(null);
    }
  }
private static void notifyIfRestartRequired(boolean restartRequired)