@NotNull
  protected Runnable doPerformRediff(@NotNull ProgressIndicator indicator) {
    try {
      List<CharSequence> sequences = new ArrayList<>();

      indicator.checkCanceled();
      IgnorePolicy ignorePolicy = myTextDiffProvider.getIgnorePolicy();

      List<DocumentContent> contents = myMergeRequest.getContents();
      MergeRange importRange = ReadAction.compute(() -> {
        sequences.addAll(ContainerUtil.map(contents, content -> content.getDocument().getImmutableCharSequence()));
        if (getTextSettings().isAutoResolveImportConflicts()) {
          initPsiFiles();
          return MergeImportUtil.getImportMergeRange(myProject, myPsiFiles);
        }
        return null;
      });
      MergeLineFragmentsWithImportMetadata lineFragments = getLineFragments(indicator, sequences, importRange, ignorePolicy);
      List<LineOffsets> lineOffsets = ContainerUtil.map(sequences, LineOffsetsUtil::create);
      List<MergeConflictType> conflictTypes = ContainerUtil.map(lineFragments.getFragments(), fragment -> {
        return MergeRangeUtil.getLineMergeType(fragment, sequences, lineOffsets, ignorePolicy.getComparisonPolicy());
      });

      FoldingModelSupport.Data foldingState =
        myFoldingModel.createState(lineFragments.getFragments(), lineOffsets, getFoldingModelSettings());

      return () -> apply(ThreeSide.BASE.select(sequences), lineFragments, conflictTypes, foldingState, ignorePolicy);
    }
    catch (DiffTooBigException e) {
      return applyNotification(DiffNotifications.createDiffTooBig());
    }
    catch (ProcessCanceledException e) {
      throw e;
    }
    catch (Throwable e) {
      LOG.error(e);
      return () -> {
        clearDiffPresentation();
        myPanel.setErrorContent();
      };
    }
  }
@NotNull
  protected Runnable doPerformRediff(@NotNull ProgressIndicator indicator)