void (@Nullable final Project project, @Nullable Module module) { final PyConfigurableInterpreterList interpreterList = PyConfigurableInterpreterList.getInstance(project); final Sdk[] sdks = interpreterList.getModel().getSdks(); //noinspection unchecked final JComboBox<Sdk> comboBox = getComboBox(); final Sdk oldSelectedSdk = (Sdk)comboBox.getSelectedItem(); PyAddSdkDialog.show(project, module, Arrays.asList(sdks), sdk -> { if (sdk == null) return; final ProjectSdksModel projectSdksModel = interpreterList.getModel(); if (projectSdksModel.findSdk(sdk) == null) { projectSdksModel.addSdk(sdk); try { projectSdksModel.apply(); } catch (ConfigurationException e) { LOG.error("Error adding new python interpreter " + e.getMessage()); } } final List<Sdk> committedSdks = interpreterList.getAllPythonSdks(); final Sdk copiedSdk = interpreterList.getModel().findSdk(sdk.getName()); comboBox.setModel(new CollectionComboBoxModel<>(committedSdks, oldSelectedSdk)); comboBox.setSelectedItem(copiedSdk); notifyChanged(null); }); }