@NotNull
  public DiffContent createDiffContent(@Nullable Project project, @NotNull ProgressIndicator indicator)
    throws DiffRequestProducerException, ProcessCanceledException {
    try {
      final T src = getValue();
      if (src instanceof VirtualFile) {
        return DiffContentFactory.getInstance().create(project, (VirtualFile)src);
      }

      byte[] content = getContent();
      if (content == null) throw new DiffRequestProducerException(DiffBundle.message("error.cant.show.dirdiff.preview.cant.load.content"));

      return DiffContentFactory.getInstance().create(project, new String(content, getCharset()), getFileType());
    }
    catch (IOException e) {
      throw new DiffRequestProducerException(e);
    }
  }
@NotNull
  public DiffContent createDiffContent(@Nullable Project project, @NotNull ProgressIndicator indicator)