Bug 360291 - [breakpoints] Allow user to edit line breakpoint file in properties dialog.
Summary: [breakpoints] Allow user to edit line breakpoint file in properties dialog.
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 18:41 EDT by Pawel Piech CLA
Modified: 2020-09-04 15:16 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Piech CLA 2011-10-07 18:41:48 EDT
The line breakpoint dialog should allow user to edit breakpoint file in the same way that it lets user edit the line number.  Browse buttons should be available to select from workspace or file system.

To implement this feature, the property dialog will need to be able to remove the existing breakpoint and replace it with a new one.  Also, the properties dialog should be able to create a new line breakpoint and set all of its properties other at the same time.
Comment 1 Pawel Piech CLA 2011-11-10 09:45:06 EST
Design notes:

This is mostly covered in bug 360588.  One additional thing to note here, is that the path of the breakpoint resource will need to be tracked as one of its properties.  The preference page will first need to save the requested resource to the preference store, then upon okPressed() the preference store will create the breakpoint marker based on this preference value.  To modify the file of an existing breakpoint, the preference page will still just modify the preference, but the preference store will first need to delete the old breakpoint prior to creating a new one.
Comment 2 Pawel Piech CLA 2011-11-10 13:03:59 EST
Additional note:
Breakpoint extensions (via ICBreakpointExtension) will need to be moved from the old breakpoint to the new one.  If a given breakpoint extension stores all its data inside the extension object (as CBreakpointFilterExtension and CBreakpointGdbThreadsFilterExtension currently do), then simply adding the extension from the old breakpoint to the new breakpoint should be sufficient.  However, for extensions that do store data in the breakpoint marker we may need to invent a new API (or just reuse ICBreakpointExtension.initialize()) to notify the extension that it should re-initialize itself from the new marker.
Comment 3 Marc Khouzam CLA 2015-05-25 11:53:58 EDT
Bug 464917 (and other previous enhancements) has paved the way for this enhancement.  The file is now editable when using the new "Add line breakpoint (C/C++)..." action of the breakpoint view menu.

It could also be enabled when modifying a breakpoint or when creating one through a ctrl-double-click on the editor margin.  What would need to be done is to make sure that a bp can be moved to another file in the backend and that a marker location is properly updated when doing such a change.