Bug 6408 Attempts to set breakpoint on unsaved resource fails
Create an empty class call Test Paste in: public static void main(String[] args) { while(true) { try { throwIt(); } catch (Exception e) { } } } public static void throwIt() throws InterruptedException { while(true) { Thread.yield(); } } Do NOT save Attempt to add a breakpoint on the Thread.yield() line We silently do not add the breakpoint.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/BreakpointRulerAction.java
public BreakpointRulerAction(IVerticalRuler ruler, ITextEditor editor) {
		super(JavaEditorMessages.getResourceBundle(), "ManageBreakpoints.", ruler, editor, IBreakpoint.BREAKPOINT_MARKER, false); 
	}
	
	
	/**
	 * Checks whether the element the breakpoint refers to is shown in this editor
	 */
	protected boolean breakpointElementInEditor(IBreakpointManager manager, IMarker marker) {
		return true;
	}
	
	/**
	 * @see MarkerRulerAction#getMarkers
	 */
	protected List getMarkers() {
		
		List breakpoints= new ArrayList();
		
		IResource resource= getResource();
		IDocument document= getDocument();
		AbstractMarkerAnnotationModel model= getAnnotationModel();