public void actionPerformed()

in src/com/intellij/vssSupport/actions/GetAction.java [52:89]


  public void actionPerformed( AnActionEvent e )
  {
    Project project = e.getData( CommonDataKeys.PROJECT );
    VirtualFile[] files = VssUtil.getVirtualFiles( e );

    ArrayList<VcsException> errors = new ArrayList<>();
    try
    {
      boolean showOptions = VssVcs.getInstance( project ).getGetOptions().getValue();
      if( showOptions || isShiftPressed( e ) ) {
        OptionsDialog editor = allFilesAreFolders(files) ? new GetDirDialog(project) :
                               new GetFilesDialog(project);
        editor.setTitle((files.length == 1) ? VssBundle.message("dialog.title.get.file", files[0].getName()) :
                        VssBundle.message("dialog.title.get.multiple"));
        if (!editor.showAndGet()) {
          return;
        }
      }
      if( allFilesAreFolders( files ) )
      {
        for( VirtualFile file : files )
        {
          (new GetDirCommand( project, file, errors )).execute();
          if( !errors.isEmpty() )
            break;
        }
      }
      else
      {
        (new GetFilesCommand( project, files, errors )).execute();
      }
    }
    finally
    {
      if( !errors.isEmpty() )
        Messages.showErrorDialog( errors.get( 0 ).getLocalizedMessage(), VssBundle.message("message.title.could.not.start.process"));
    }
  }