Rectangle r= new Rectangle(0, 0, 0, 0);
int yy, hh= ANNOTATION_HEIGHT;
IDocument document= fTextViewer.getDocument();
StyledText textWidget= fTextViewer.getTextWidget();
ITextViewerExtension5 extension= null;
IRegion visible= null;
if (fTextViewer instanceof ITextViewerExtension5)
extension= (ITextViewerExtension5) fTextViewer;
else
visible= fTextViewer.getVisibleRegion(); // legacy support
WidgetInfos infos= null;
for (Iterator iterator= fAnnotationsSortedByLayer.iterator(); iterator.hasNext();) {
Object annotationType= iterator.next();
if (skip(annotationType))
continue;
int[] style= new int[] { FilterIterator.PERSISTENT, FilterIterator.TEMPORARY };
for (int t=0; t < style.length; t++) {
boolean areColorsComputed= false;
Color fill= null;
Color stroke= null;
Iterator e= new FilterIterator(annotationType, style[t], fCachedAnnotations.iterator());
while (e.hasNext()) {
Annotation a= (Annotation) e.next();
Position p= fModel.getPosition(a);
if (p == null)
continue;
if (visible != null && !p.overlapsWith(visible.getOffset(), visible.getLength()))
continue;
int annotationOffset= p.getOffset();
int annotationLength= p.getLength();
IRegion widgetRegion= null;
if (visible != null) {
annotationOffset= Math.max(p.getOffset(), visible.getOffset());
int annotationEnd= Math.min(p.getOffset() + p.getLength(), visible.getOffset() + visible.getLength());
annotationLength= annotationEnd - annotationOffset;
} else {
widgetRegion= extension.modelRange2WidgetRange(new Region(annotationOffset, annotationLength));
if (widgetRegion == null)
continue;
}
if (infos == null) {