static void applyUnacceptedLevels(@NotNull Project project,
                                    MultiMap<LanguageLevel, Module> unacceptedLevels,
                                    TreeSet<LanguageLevel> previewLevels) {
    if (!unacceptedLevels.isEmpty()) {
      decreaseLanguageLevel(project);

      for (LanguageLevel level : unacceptedLevels.keySet()) {
        showNotificationToAccept(project, unacceptedLevels, level);
      }
    }
    if (!previewLevels.isEmpty()) {
      LanguageLevel languageLevel = previewLevels.first();
      if (languageLevel == LanguageLevel.JDK_X) {
        return;
      }

      int previewFeature = languageLevel.feature();
      if (languageLevel.isUnsupported()) {
        getNotificationGroup().createNotification(
            JavaBundle.message("java.preview.features.unsupported.title"),
            JavaBundle.message("java.preview.features.unsupported", previewFeature),
            NotificationType.ERROR)
          .notify(project);
      }
      else if (!PropertiesComponent.getInstance(project).getBoolean(IGNORE_USED_PREVIEW_FEATURES, false)) {
        getNotificationGroup().createNotification(
            JavaBundle.message("java.preview.features.notification.title"),
            JavaBundle.message("java.preview.features.warning", previewFeature + 1, previewFeature),
            NotificationType.WARNING)
          .addAction(new NotificationAction(IdeBundle.message("action.Anonymous.text.do.not.show.again")) {
            @Override
            public void actionPerformed(@NotNull AnActionEvent e, @NotNull Notification notification) {
              PropertiesComponent.getInstance(project).setValue(IGNORE_USED_PREVIEW_FEATURES, true);
              notification.expire();
            }
          })
          .notify(project);
      }
    }
  }
static void applyUnacceptedLevels(@NotNull Project project,
                                    MultiMap<LanguageLevel, Module> unacceptedLevels,
                                    TreeSet<LanguageLevel> previewLevels)