Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316905 - DebugMarkerAnnotationModel does not reliably remove annotations for removed breakpoints
Summary: DebugMarkerAnnotationModel does not reliably remove annotations for removed b...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 5.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.0.1   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-15 09:44 EDT by Anton Leherbauer CLA
Modified: 2010-07-14 05:23 EDT (History)
1 user (show)

See Also:


Attachments
Fix (4.25 KB, patch)
2010-07-13 09:56 EDT, Anton Leherbauer CLA
aleherb+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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