void (@NotNull Project project, MultiMap<LanguageLevel, Module> unacceptedLevels, LanguageLevel level) { NOTIFICATION_GROUP.createNotification( JavaBundle.message("java.preview.features.alert.title"), JavaBundle.message("java.preview.features.legal.notice", level.getPresentableText(), "<br/><br/><a href='accept'>" + JavaBundle.message( "java.preview.features.accept.notification.link") + "</a>"), NotificationType.WARNING) .setListener((notification, event) -> { if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { if (event.getDescription().equals("accept")) { acceptAndRestore(project, unacceptedLevels.get(level), level); } notification.expire(); } }) .notify(project); }