private static List<DocumentContent> getDocumentContentsForViewer(@Nullable Project project,
                                                                    @NotNull List<byte[]> byteContents,
                                                                    @Nullable ConflictType conflictType,
                                                                    @NotNull DiffContentFactoryEx.ContextProvider contextProvider) {
    DiffContentFactoryEx contentFactory = DiffContentFactoryEx.getInstanceEx();

    DocumentContent current = contentFactory.documentContent(project, true)
      .contextByProvider(contextProvider)
      .buildFromBytes(notNull(byteContents.get(0), EMPTY_BYTE_ARRAY));
    DocumentContent last = contentFactory.documentContent(project, true)
      .contextByProvider(contextProvider)
      .buildFromBytes(notNull(byteContents.get(2), EMPTY_BYTE_ARRAY));

    DocumentContent original;
    if (conflictType == ConflictType.ADDED_ADDED) {
      ProgressIndicator indicator = EmptyProgressIndicator.notNullize(ProgressManager.getInstance().getProgressIndicator());

      CharSequence currentContent = getDocumentCharSequence(current);
      CharSequence lastContent = getDocumentCharSequence(last);
      String newContent =
        ComparisonManager.getInstance().mergeLinesAdditions(currentContent, lastContent, ComparisonPolicy.IGNORE_WHITESPACES, indicator);
      original = contentFactory.documentContent(project, true)
        .contextByProvider(contextProvider)
        .buildFromText(newContent, false);
    }
    else {
      original = contentFactory.documentContent(project, true)
        .contextByProvider(contextProvider)
        .buildFromBytes(notNull(byteContents.get(1), EMPTY_BYTE_ARRAY));
    }
    return Arrays.asList(current, original, last);
  }
private static List<DocumentContent> getDocumentContentsForViewer(@Nullable Project project,
                                                                    @NotNull List<byte[]> byteContents,
                                                                    @Nullable ConflictType conflictType,
                                                                    @NotNull DiffContentFactoryEx.ContextProvider contextProvider)