void () { final Project project = getRootModel().getModule().getProject(); Predicate<SdkTypeId> predicate = SimpleJavaSdkType.notSimpleJavaSdkType(); myCbModuleJdk = new JdkComboBox(project, myJdksModel, predicate::test, WslSdkFilter.filterSdkByWsl(project), WslSdkFilter.filterSdkSuggestionByWsl(project), null, jdk -> { final Sdk projectJdk = myJdksModel.getProjectSdk(); if (projectJdk == null) { final int res = Messages.showYesNoDialog(myJdkPanel, JavaUiBundle.message("project.roots.no.jdk.on.project.message"), JavaUiBundle.message("project.roots.no.jdk.on.project.title"), Messages.getInformationIcon()); if (res == Messages.YES) { myJdksModel.setProjectSdk(jdk); } } }); myCbModuleJdk.showProjectSdkItem(); myCbModuleJdk.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (myFreeze) return; final Sdk newJdk = myCbModuleJdk.getSelectedJdk(); myModuleEditor.setSdk(newJdk); clearCaches(); } }); final JButton editButton = new JButton(ApplicationBundle.message("button.edit")); myCbModuleJdk.setEditButton(editButton, getRootModel().getModule().getProject(), () -> getRootModel().getSdk()); myJdkPanel = new ModuleJdkConfigurableUi(myCbModuleJdk, editButton).getPanel(); }