public void editFiles()

in src/com/intellij/vssSupport/VssEditFileProvider.java [27:62]


  public void editFiles( VirtualFile[] files )
  {
    ArrayList<VcsException> errors = new ArrayList<>();
    for( final VirtualFile file : files )
    {
      //  Calc options for each iteration since user can set "do not show"
      //  in the middle.
      boolean showOptions = VssVcs.getInstance( project ).getCheckoutOptions().getValue();
      if( showOptions ) {
        CheckoutFilesDialog editor = new CheckoutFilesDialog(project);
        editor.setTitle(VssBundle.message("dialog.title.check.out.file", file.getName()));
        if (!editor.showAndGet()) {
          return;
        }
      }
      ( new CheckoutFileCommand( project, file, errors )).execute();

      //  In the case of any errors, set RO status back to the file.
      if( !errors.isEmpty() )
      {
        Messages.showErrorDialog( errors.get( 0 ).getLocalizedMessage(), VssBundle.message("message.title.error"));

        ApplicationManager.getApplication().runWriteAction(() -> {
          try {   ReadOnlyAttributeUtil.setReadOnlyAttribute( file, false );  }
          catch( IOException e ) {
            Messages.showErrorDialog( VssBundle.message("message.text.ro.set.error", file.getPath()),
                                      VssBundle.message("message.title.error"));
          }
        });
      }
      errors.clear();
    }

    for( VirtualFile file : files )
      file.refresh( true, false );
  }