private static void collectDeletedFiles(@NotNull VirtualFile f, @NotNull List<? super VirtualFile> files) {
    if (!(f instanceof NewVirtualFile)) return;

    ProgressManager.checkCanceled();
    if (!f.isDirectory()) {
      files.add(f);
    }
    else {
      for (VirtualFile each : ((NewVirtualFile)f).iterInDbChildren()) {
        collectDeletedFiles(each, files);
      }
    }
  }
private static void collectDeletedFiles(@NotNull VirtualFile f, @NotNull List<? super VirtualFile> files)