Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316905

Summary: DebugMarkerAnnotationModel does not reliably remove annotations for removed breakpoints
Product: [Tools] CDT Reporter: Anton Leherbauer <aleherb+eclipse>
Component: cdt-debugAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Ken Ryall <ken.ryall>
Severity: normal    
Priority: P3 CC: pawel.1.piech
Version: 5.0   
Target Milestone: 7.0.1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix aleherb+eclipse: iplog-

Description Anton Leherbauer CLA 2010-06-15 09:44:33 EDT
The DebugMarkerAnnotationModel handles breakpoint annotations for external files.
If a breakpoint has been added to the model and gets changed later on such that it is no longer "acceptable" for the model, it cannot be removed any longer.

The obvious fix should be to remove the isAcceptable() call in breakpointsRemoved(), because a breakpoint does not need to be acceptable to remove its annotation from the model.

I have not found a real scenario with plain CDT, but it happens in our product.
Comment 1 Anton Leherbauer CLA 2010-07-13 09:56:39 EDT
Created attachment 174145 [details]
Fix

This patch fixes the issue and streamlines the "isAcceptable" criterion.
Acceptable is any breakpoint which has the ICBreakpoint.SOURCE_HANDLE attribute set to the file in question.
Comment 3 Anton Leherbauer CLA 2010-07-14 04:45:49 EDT
Committed to HEAD, cdt_7_0 and cdt_6_0.
Comment 4 CDT Genie CLA 2010-07-14 05:23:03 EDT
*** cdt cvs genie on behalf of aleherbau ***
Bug 316905 - DebugMarkerAnnotationModel does not reliably remove annotations for removed breakpoints

[*] DebugMarkerAnnotationModel.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/DebugMarkerAnnotationModel.java?root=Tools_Project&r1=1.5&r2=1.6