List<Range> (@NotNull VirtualFile virtualFile, @NotNull ChangeListManager changeListManager) { try { Change change = changeListManager.getChange(virtualFile); if (change == null) return Collections.emptyList(); ContentRevision revision = change.getBeforeRevision(); if (revision == null) return Collections.emptyList(); String oldContent = revision.getContent(); if (oldContent == null) return Collections.emptyList(); String newContent = VfsUtilCore.loadText(virtualFile); return ContainerUtil.newArrayList( RangesBuilder.compareLines(newContent, oldContent, LineOffsetsUtil.create(newContent), LineOffsetsUtil.create(oldContent)) .iterateUnchanged()); } catch (VcsException | IOException e) { LOG.error("Couldn't load content", e); return Collections.emptyList(); } }