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
package org.eclipse.jdt.internal.ui.javaeditor;
/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;