コード例 #1
0
 @Override
 public void apply(SdkModificator sdkModificator) {
   if (sdkModificator.getSdkAdditionalData() instanceof PyRemoteSdkAdditionalDataBase) {
     for (PathMappingSettings.PathMapping mapping : myNewMappings) {
       ((PyRemoteSdkAdditionalDataBase) sdkModificator.getSdkAdditionalData())
           .getPathMappings()
           .addMappingCheckUnique(mapping.getLocalRoot(), mapping.getRemoteRoot());
     }
   }
   super.apply(sdkModificator);
 }
コード例 #2
0
    @Override
    public void actionPerformed(AnActionEvent e) {
      Sdk sdk = getSelectedSdk();
      final PythonPathEditor pathEditor = createPathEditor(sdk);
      final SdkModificator sdkModificator = myModificators.get(sdk);

      PythonPathDialog dialog = new PythonPathDialog(myProject, pathEditor);
      pathEditor.reset(sdk != null ? sdkModificator : null);
      if (dialog.showAndGet()) {
        if (pathEditor.isModified()) {
          pathEditor.apply(sdkModificator);
          myModifiedModificators.add(sdkModificator);
        }
      }
      updateOkButton();
    }