boolean (Component parent, LanguageLevel level) { int result = LegalNoticeDialog.build(JavaBundle.message("java.preview.features.alert.title"), JavaBundle.message("java.preview.features.legal.notice", level.getPresentableText(), "")) .withParent(parent).show(); if (result == DialogWrapper.OK_EXIT_CODE) { acceptAndRestore(null, null, level); return true; } else { return false; } }