void (@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() && !PropertiesComponent.getInstance(project).getBoolean(IGNORE_USED_PREVIEW_FEATURES, false)) { LanguageLevel languageLevel = previewLevels.first(); if (languageLevel == LanguageLevel.JDK_X) { return; } int previewFeature = languageLevel.toJavaVersion().feature; PREVIEW_NOTIFICATION_GROUP.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); } }