public static @Nullable Change getChangeWithLocal(@NotNull Change c, boolean useBeforeVersion, boolean isAfterRevisionLocal) {
    ContentRevision revision = useBeforeVersion ? c.getBeforeRevision() : c.getAfterRevision();
    ContentRevision otherRevision = useBeforeVersion ? c.getAfterRevision() : c.getBeforeRevision();

    VirtualFile file = getLocalVirtualFileFor(revision);
    if (file == null) file = getLocalVirtualFileFor(otherRevision); // handle renames gracefully

    ContentRevision localRevision = file != null ? CurrentContentRevision.create(VcsUtil.getFilePath(file)) : null;
    if (revision == null && localRevision == null) return null;

    if (isAfterRevisionLocal) {
      return new Change(revision, localRevision);
    }
    return new Change(localRevision, revision);
  }
public static @Nullable Change getChangeWithLocal(@NotNull Change c, boolean useBeforeVersion, boolean isAfterRevisionLocal)