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
public void setHighlightColor(Color color) {
		fColor= color;
	}
	
	/*
	 * @see IPainter#dispose()
	 */
	public void dispose() {
		fColor= null;
		fTextWidget= null;
		fModel= null;
		fProblemPositions= null;
	}
	
	/*
	 * @see PaintListener#paintControl(PaintEvent)
	 */
	public void paintControl(PaintEvent event) {
		if (fTextWidget != null)
			handleDrawRequest(event.gc);
	}
	
	private void handleDrawRequest(GC gc) {
		
		int vOffset= fSourceViewer.getTopIndexStartOffset();
		int vLength= fSourceViewer.getBottomIndexEndOffset();
		
		IRegion region= fSourceViewer.getVisibleRegion();
		int offset= region.getOffset();
		int length= region.getLength();