/** * Returns the line ranges of this revision information. The returned information is only valid * at the moment it is returned, and may change as the annotated document is modified. See * {@link IRevisionListener} for a way to be informed when the revision information changes. The * returned list is sorted by document offset. * * @return an unmodifiable view of the line ranges * @see IRevisionListener * @since 3.3 */ public List<RevisionRange> getRanges() { if (fRanges == null) { List<RevisionRange> ranges= new ArrayList<>(fRevisions.size() * 2); // wild size guess for (Revision revision : fRevisions) { ranges.addAll(revision.getRegions()); } // sort by start line Collections.sort(ranges, (r1, r2) -> r1.getStartLine() - r2.getStartLine()); fRanges= Collections.unmodifiableList(ranges); } return fRanges; }
/** * Returns the line ranges of this revision information. The returned information is only valid * at the moment it is returned, and may change as the annotated document is modified. See * {@link IRevisionListener} for a way to be informed when the revision information changes. The * returned list is sorted by document offset. * * @return an unmodifiable view of the line ranges * @see IRevisionListener * @since 3.3 */ public List<RevisionRange> getRanges() { if (fRanges == null) { List<RevisionRange> ranges= new ArrayList<>(fRevisions.size() * 2); // wild size guess for (Iterator<Revision> it= fRevisions.iterator(); it.hasNext();) { Revision revision= it.next(); ranges.addAll(revision.getRegions()); } // sort by start line Collections.sort(ranges, (r1, r2) -> r1.getStartLine() - r2.getStartLine()); fRanges= Collections.unmodifiableList(ranges); } return fRanges; }
if (revision != null) { added= new HashMap<>(); for (Iterator<RevisionRange> it= revision.getRegions().iterator(); it.hasNext();) { RevisionRange range= it.next(); try {
if (revision != null) { added= new HashMap<>(); for (RevisionRange range : revision.getRegions()) { try { IRegion charRegion= toCharRegion(range);
List<RevisionRange> ranges= fFocusRevision.getRegions(); if (up) { for (Iterator<RevisionRange> it= ranges.iterator(); it.hasNext();) {
List<RevisionRange> ranges= fFocusRevision.getRegions(); if (up) { for (RevisionRange range : ranges) {