コード例 #1
0
 private void addSdk(AnActionButton button) {
   PythonSdkDetailsStep.show(
       myProject,
       myProjectSdksModel.getSdks(),
       null,
       myMainPanel,
       button.getPreferredPopupPoint().getScreenPoint(),
       sdk -> addCreatedSdk(sdk, true));
 }
コード例 #2
0
 private void editRemoteSdk(Sdk currentSdk) {
   PythonRemoteInterpreterManager remoteInterpreterManager =
       PythonRemoteInterpreterManager.getInstance();
   if (remoteInterpreterManager != null) {
     final SdkModificator modificator = myModificators.get(currentSdk);
     Set<Sdk> existingSdks = Sets.newHashSet(myProjectSdksModel.getSdks());
     existingSdks.remove(currentSdk);
     if (remoteInterpreterManager.editSdk(myProject, modificator, existingSdks)) {
       myModifiedModificators.add(modificator);
     }
   }
 }
コード例 #3
0
 private boolean isDuplicateSdkName(String s, Sdk sdk) {
   for (Sdk existingSdk : myProjectSdksModel.getSdks()) {
     if (existingSdk == sdk) {
       continue;
     }
     String existingName;
     if (myModificators.containsKey(existingSdk)) {
       existingName = myModificators.get(existingSdk).getName();
     } else {
       existingName = existingSdk.getName();
     }
     if (existingName.equals(s)) {
       return true;
     }
   }
   return false;
 }