@NotNull
  public static MutableDiffRequestChain createMutableChainFromFiles(@Nullable Project project,
                                                                    @NotNull VirtualFile file1,
                                                                    @NotNull VirtualFile file2,
                                                                    @Nullable VirtualFile baseFile) {
    DiffContentFactory contentFactory = DiffContentFactory.getInstance();
    DiffRequestFactory requestFactory = DiffRequestFactory.getInstance();

    DiffContent content1 = contentFactory.create(project, file1);
    DiffContent content2 = contentFactory.create(project, file2);
    DiffContent baseContent = baseFile != null ? contentFactory.create(project, baseFile) : null;

    MutableDiffRequestChain chain;
    if (content1 instanceof DocumentContent && content2 instanceof DocumentContent &&
        (baseContent == null || baseContent instanceof DocumentContent)) {
      chain = BlankDiffWindowUtil.createBlankDiffRequestChain((DocumentContent)content1,
                                                              (DocumentContent)content2,
                                                              (DocumentContent)baseContent);
    }
    else {
      chain = new MutableDiffRequestChain(content1, baseContent, content2);
    }

    if (baseFile != null) {
      chain.setWindowTitle(requestFactory.getTitle(baseFile));
    }
    else {
      chain.setWindowTitle(requestFactory.getTitle(file1, file2));
    }
    return chain;
  }
@NotNull
  public static MutableDiffRequestChain createMutableChainFromFiles(@Nullable Project project,
                                                                    @NotNull VirtualFile file1,
                                                                    @NotNull VirtualFile file2,
                                                                    @Nullable VirtualFile baseFile)