private void processAddition(@NotNull Collection<? extends FilePath> filePaths) {
    Map<VcsRoot, List<FilePath>> map = groupByRoots(myProject, filePaths, identity());

    for (VcsRoot vcsRoot : map.keySet()) {
      AbstractVcs vcs = vcsRoot.getVcs();
      if (vcs == null) continue;

      final CheckinEnvironment localChangesProvider = vcs.getCheckinEnvironment();
      if (localChangesProvider == null) continue;
      final boolean takeDirs = vcs.areDirectoriesVersionedItems();

      final Collection<FilePath> files = map.get(vcsRoot);
      final List<FilePath> toBeAdded = new ArrayList<>();
      if (takeDirs) {
        final RecursiveCheckAdder adder = new RecursiveCheckAdder(vcsRoot.getPath());
        for (FilePath file : files) {
          adder.process(file);
        }
        toBeAdded.addAll(adder.getToBeAdded());
      }
      else {
        for (FilePath file : files) {
          if (!file.isDirectory()) {
            toBeAdded.add(file);
          }
        }
      }

      if (toBeAdded.isEmpty()) return;
      myAffected.addAll(toBeAdded);

      if (!vcs.fileListenerIsSynchronous()) {
        myVcsFileListenerContextHelper.ignoreAdded(toBeAdded);

        Set<FilePath> paths = myPreparedAddition.computeIfAbsent(vcs, key -> new HashSet<>());
        paths.addAll(toBeAdded);
      }
    }
  }
private void processAddition(@NotNull Collection<? extends FilePath> filePaths)