void (@NotNull ProgressIndicator indicator) { SdkLookupUtil.findAndSetupSdk(project, indicator, JavaSdk.getInstance(), sdk -> { JavaSdkUtil.applyJdkToProject(project, sdk); Notifications.Bus.notify(new Notification("Setup SDK", JavaBundle.message("notification.content.was.set.up", sdk.getVersionString()), NotificationType.INFORMATION).addAction( new NotificationAction(JavaBundle.message("notification.content.change.jdk")) { @Override public void actionPerformed(@NotNull AnActionEvent e, @NotNull Notification notification) { SdkPopupFactory .newBuilder() .withProject(project) .withSdkTypeFilter(type -> type instanceof JavaSdkType) .updateProjectSdkFromSelection() .onPopupClosed(() -> notification.hideBalloon()) .buildPopup() .showPopup(e); } })); return null; }); }