Bug 18581 Single element view - markers from other elements shown
0) set some breakpoints in two methods, a, b 1) switch to the single element view in the editor 2) select a ->you can see the breakpoint on method b as a ghost (i.e. they do not update as user edits)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
private static int getInclusiveTopIndexStartOffset(StyledText text, IDocument document, int visibleRegionOffset) {
		
		if (text != null) {	
			int top= text.getTopIndex();
			if ((text.getTopPixel() % text.getLineHeight()) != 0)
				top--;
			try {
				top= document.getLineOffset(top -  visibleRegionOffset);
				return top + visibleRegionOffset;
			} catch (BadLocationException ex) {
			}
		}
		
		return -1;
	}
	
	/*
	 * @see PaintListener#paintControl(PaintEvent)
	 */
	public void paintControl(PaintEvent event) {
		if (fTextWidget != null)
			handleDrawRequest(event.gc);
	}
	
	private void handleDrawRequest(GC gc) {
		IRegion region= fSourceViewer.getVisibleRegion();
		int offset= region.getOffset();
		int length= region.getLength();
		int vOffset= getInclusiveTopIndexStartOffset(fTextWidget, fSourceViewer.getDocument(), offset);		
		int vLength= fSourceViewer.getBottomIndexEndOffset();