Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 140802
Collapse All | Expand All

(-)src/org/eclipse/jface/text/source/AnnotationPainter.java (-11 / +2 lines)
Lines 1193-1199 Link Here
1193
			Annotation a= (Annotation)entry.getKey();
1193
			Annotation a= (Annotation)entry.getKey();
1194
			Decoration pp = (Decoration)entry.getValue();
1194
			Decoration pp = (Decoration)entry.getValue();
1195
			// prune any annotation that is not drawable or does not need drawing
1195
			// prune any annotation that is not drawable or does not need drawing
1196
			if (!(a.isMarkedDeleted() || pp.fPainter == fgNullDrawer || pp.fPainter instanceof NullStrategy || skip(a) || !pp.fPosition.overlapsWith(vOffset, vLength))) {
1196
			if (!(a.isMarkedDeleted() || pp.fPainter == fgNullDrawer || pp.fPainter instanceof NullStrategy || skip(a) || !overlapsWith(vOffset, vLength, pp.fPosition.getOffset(), pp.fPosition.getLength()))) {
1197
				// ensure sized appropriately
1197
				// ensure sized appropriately
1198
				for (int i= toBeDrawn.size(); i <= pp.fLayer; i++)
1198
				for (int i= toBeDrawn.size(); i <= pp.fLayer; i++)
1199
					toBeDrawn.add(new LinkedList());
1199
					toBeDrawn.add(new LinkedList());
Lines 1377-1392 Link Here
1377
	private boolean overlapsWith(int offset1, int length1, int offset2, int length2) {
1377
	private boolean overlapsWith(int offset1, int length1, int offset2, int length2) {
1378
		int end= offset2 + length2;
1378
		int end= offset2 + length2;
1379
		int thisEnd= offset1 + length1;
1379
		int thisEnd= offset1 + length1;
1380
1380
		return offset1 <= end && offset2 <= thisEnd;
1381
		if (length2 > 0) {
1382
			if (length1 > 0)
1383
				return offset1 < end && offset2 < thisEnd;
1384
			return  offset2 <= offset1 && offset1 < end;
1385
		}
1386
1387
		if (length1 > 0)
1388
			return offset1 <= offset2 && offset2 < thisEnd;
1389
		return offset1 == offset2;
1390
	}
1381
	}
1391
1382
1392
	/*
1383
	/*

Return to bug 140802