/** * Gets all change ranges of the revisions in the revision model and adapts them to the current * quick diff information. The list is cached. * * @return the list of all change regions, with diff information applied */ private synchronized List<RevisionRange> getRangeCache() { if (fRevisionRanges == null) { if (fRevisionInfo == null) { fRevisionRanges= Collections.emptyList(); } else { Hunk[] hunks= HunkComputer.computeHunks(fLineDiffer, fViewer.getDocument().getNumberOfLines()); fRevisionInfo.applyDiff(hunks); fRevisionRanges= fRevisionInfo.getRanges(); updateOverviewAnnotations(); informListeners(); } } return fRevisionRanges; }
/** * Gets all change ranges of the revisions in the revision model and adapts them to the current * quick diff information. The list is cached. * * @return the list of all change regions, with diff information applied */ private synchronized List<RevisionRange> getRangeCache() { if (fRevisionRanges == null) { if (fRevisionInfo == null) { fRevisionRanges= Collections.emptyList(); } else { Hunk[] hunks= HunkComputer.computeHunks(fLineDiffer, fViewer.getDocument().getNumberOfLines()); fRevisionInfo.applyDiff(hunks); fRevisionRanges= fRevisionInfo.getRanges(); updateOverviewAnnotations(); informListeners(); } } return fRevisionRanges; }
/** * Sets the revision information to be drawn and triggers a redraw. * * @param info the revision information to show, <code>null</code> to draw none */ public void setRevisionInformation(RevisionInformation info) { if (fRevisionInfo != info) { fRequiredWidth= -1; fRevisionIdChars= 0; fRevisionInfo= info; clearRangeCache(); updateFocusRange(null); handleRevisionSelected((Revision) null); fColorTool.setInfo(info); postRedraw(); informListeners(); } }
/** * Sets the revision information to be drawn and triggers a redraw. * * @param info the revision information to show, <code>null</code> to draw none */ public void setRevisionInformation(RevisionInformation info) { if (fRevisionInfo != info) { fRequiredWidth= -1; fRevisionIdChars= 0; fRevisionInfo= info; clearRangeCache(); updateFocusRange(null); handleRevisionSelected((Revision) null); fColorTool.setInfo(info); postRedraw(); informListeners(); } }