Bug 125771 - unable to create method breakpoints in external source
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
index e1dfe8f..efa4340 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
@@ -289,9 +289,9 @@
                                 // exist. If yes, remove it, else create one
                                 IJavaMethodBreakpoint existing = getMethodBreakpoint(typeName, methodName, methodSignature);
                                 if (existing == null) {
-                                	removeBreakpoint(existing, true);
-                                } else {
                                 	createMethodBreakpoint(getResource((IEditorPart) part), typeName, methodName, methodSignature, true, false, false, -1, -1, -1, 0, true, new HashMap(10));
+                                } else {
+                                	removeBreakpoint(existing, true);
                                 }
                             }
                         }
@@ -429,6 +429,8 @@
     			if (provider != null && provider.getPath(input) != null) {
     				return false;
     			}
+    		} else {
+    			return false;
     		}
     		return true;
     	}