@Override
  public void showNotification(@NotNull Notification notification, @Nullable Project project) {
    NotificationsConfigurationImpl configuration = NotificationsConfigurationImpl.getInstanceImpl();
    NotificationSettings settings = NotificationsConfigurationImpl.getSettings(notification.getGroupId());

    if (!configuration.isRegistered(notification.getGroupId())) {
      configuration.register(notification.getGroupId(), NotificationDisplayType.BALLOON);
    }

    if (!settings.isShouldLog() && (settings.getDisplayType() == NotificationDisplayType.NONE ||
                                    notification.isShowingPopupSuppressed() ||
                                    !configuration.SHOW_BALLOONS)) {
      notification.expire();
    }

    if (configuration.SHOW_BALLOONS) {
      if (project == null) {
        ModalityUiUtil.invokeLaterIfNeeded(ModalityState.any(), ApplicationManager.getApplication().getDisposed(),
                                           () -> showNotificationWithSpan(notification, null)
        );
      }
      else if (!project.isDisposed()) {
        StartupManager.getInstance(project).runAfterOpened(() -> {
          ModalityUiUtil.invokeLaterIfNeeded(ModalityState.any(), project.getDisposed(), () -> showNotificationWithSpan(notification, project));
        });
      }
    }
  }
@Override
  public void showNotification(@NotNull Notification notification, @Nullable Project project)