private static @Nullable LocalChangeListDiffRequest createLocalChangeListRequest(@Nullable Project project,
                                                                                   @NotNull Change change,
                                                                                   @NotNull ContentDiffRequest request) {
    if (project == null) return null;
    if (!(change instanceof ChangeListChange changeListChange)) return null;

    List<DiffContent> contents = request.getContents();
    if (contents.size() != 2) return null;
    DocumentContent content1 = tryCast(Side.LEFT.select(contents), DocumentContent.class);
    DocumentContent content2 = tryCast(Side.RIGHT.select(contents), DocumentContent.class);
    if (content1 == null || content2 == null) return null;

    if (!(content2 instanceof FileContent)) return null;
    VirtualFile virtualFile = ((FileContent)content2).getFile();

    if (!LineStatusTrackerManager.getInstance(project).arePartialChangelistsEnabled(virtualFile)) return null;

    return new LocalChangeListDiffRequest(project, virtualFile, changeListChange.getChangeListId(), changeListChange.getChangeListName(),
                                          request);
  }
private static @Nullable LocalChangeListDiffRequest createLocalChangeListRequest(@Nullable Project project,
                                                                                   @NotNull Change change,
                                                                                   @NotNull ContentDiffRequest request)