Community
Participate
Working Groups
Build ID: M20071023-1652 Steps To Reproduce: 1. Import an executable 2. Set a breakpoint on one of it's source files 3. Double click on the breakpoint in the editor 4. It should be cleared, but right now it remains The problem is in ToggleBreakpointAdapter#getResource. It's unable to get a resource to tie the editor to, so it defaults to the workspace. But when the breakpoint was set, it was able to get the owning project of the TU as the resource. So in lineBreakpointExists when it's comparing the resources, it fails to locate the breakpoint. They key is to be able to get the correct resource for the breakpoint from the editor input. In this case, it's an ExternalEditorInput. The attached patch fixes the issue. I didn't see any other way of doing it without using an internal class. But ExternalEditorInput is used many other places in debug.ui anyway. More information:
Created attachment 89274 [details] proposed patch
Thanks. I think that's straightforward.
Patch applied to cdt_4_0 and HEAD.