Bug 17365 Text Editor: icons in vert. ruler disappear for partial top line
- open Java text editor on file that is larger as view (so that you can scroll) - generate any kind of icon in vertical ruler (e.g. a breakpoint) - use the thumb to carefully scroll pixel wise so that a top line is half visible - now scroll with the scrollbar buttons (not the thumb!) until a line with an icon is at the top (half visible) Observe: as soon as a line is only partially visible its icon is no longer drawn.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
for (int i= 0; i < peeks; i++) {
			int index= 4 * i;
			coordinates[index]= leftX + (WIDTH * i);
			coordinates[index+1]= bottom;
			coordinates[index+2]= coordinates[index] + WIDTH/2;
			coordinates[index+3]= top;
		}
		
		
		coordinates[length-2]= left.x + (WIDTH * peeks);
		coordinates[length-1]= bottom;
		
		return coordinates;
	}
	
	private void draw(GC gc, int offset, int length) {
		if (gc != null) {
			
			Point left= fTextWidget.getLocationAtOffset(offset);
			Point right= fTextWidget.getLocationAtOffset(offset + length);
			
			gc.setForeground(fColor);
			int[] polyline= computePolyline(left, right, gc.getFontMetrics().getHeight());
			gc.drawPolyline(polyline);
								
		} else {
			fTextWidget.redrawRange(offset, length, true);
		}
	}