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
public class ProblemPainter implements IPainter, PaintListener, IAnnotationModelListener {
	
	
	private boolean fIsActive= false;
	private boolean fIsPainting= false;
	private boolean fIsSettingModel= false;
	
	private Color fColor;
	private ITextEditor fTextEditor;
	private ISourceViewer fSourceViewer;
	private StyledText fTextWidget;
	private IAnnotationModel fModel;
	private List fProblemPositions= new ArrayList();
	
	
	public ProblemPainter(ITextEditor textEditor, ISourceViewer sourceViewer) {
		fTextEditor= textEditor;
		fSourceViewer= sourceViewer;
		fTextWidget= sourceViewer.getTextWidget();
	}
	
	private boolean hasProblems() {
		return !fProblemPositions.isEmpty();
	}	
	
	private void enablePainting() {
		if (!fIsPainting && hasProblems()) {
			fIsPainting= true;
			fTextWidget.addPaintListener(this);
			handleDrawRequest(null);