public static void updateAddedFiles(@NotNull Iterable<? extends PsiFile> copyPsis, @NotNull Iterable<? extends PsiFile> originals) throws IncorrectOperationException {
    Iterator<? extends PsiFile> iterator = originals.iterator();
    for (PsiFile copyPsi : copyPsis) {
      PsiFile original = iterator.hasNext() ? iterator.next() : null;
      UpdateAddedFileProcessor processor = forElement(copyPsi);
      if (processor != null) {
        TreeElement tree = (TreeElement)SourceTreeToPsiMap.psiElementToTree(copyPsi);
        if (tree != null) {
          ChangeUtil.encodeInformation(tree);
        }
        processor.update(copyPsi, original);
        if (tree != null) {
          ChangeUtil.decodeInformation(tree);
        }
      }
    }
  }
public static void updateAddedFiles(@NotNull Iterable<? extends PsiFile> copyPsis, @NotNull Iterable<? extends PsiFile> originals)