public PythonSdkDetailsDialog(
     Project project, NullableConsumer<Sdk> showMoreCallback, Runnable sdkSettingsWereModified) {
   super(project, true);
   myModule = null;
   mySdkSettingsWereModified = sdkSettingsWereModified;
   setTitle(PyBundle.message("sdk.details.dialog.title"));
   myShowMoreCallback = showMoreCallback;
   myProject = project;
   myInterpreterList = PyConfigurableInterpreterList.getInstance(myProject);
   myProjectSdksModel = myInterpreterList.getModel();
   init();
   updateOkButton();
 }
  private void refreshSdkList() {
    final List<Sdk> pythonSdks = myInterpreterList.getAllPythonSdks(myProject);
    Sdk projectSdk = getSdk();
    if (!myShowOtherProjectVirtualenvs) {
      VirtualEnvProjectFilter.removeNotMatching(myProject, pythonSdks);
    }
    //noinspection unchecked
    mySdkList.setModel(new CollectionListModel<Sdk>(pythonSdks));

    mySdkListChanged = false;
    if (projectSdk != null) {
      projectSdk = myProjectSdksModel.findSdk(projectSdk.getName());
      mySdkList.clearSelection();
      mySdkList.setSelectedValue(projectSdk, true);
      mySdkList.updateUI();
    }
  }