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

Bug 312121

Summary: [breakpoints] Show fullpath not working in breakpoints view for other breakpoint type
Product: [Tools] CDT Reporter: Patrick Chuong <pchuong>
Component: cdt-debugAssignee: Patrick Chuong <pchuong>
Status: RESOLVED FIXED QA Contact: Ken Ryall <ken.ryall>
Severity: normal    
Priority: P3 CC: john.cortell, marc.khouzam, pawel.1.piech
Version: 7.0Flags: marc.khouzam: review+
john.cortell: review+
Target Milestone: 8.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch
pchuong: iplog-
reworked patch pchuong: iplog-

Description Patrick Chuong CLA 2010-05-07 15:50:43 EDT
Build Identifier: I20100312-1448

The show fullpath in the breakpoints view should be able to handle breakpoint that are not ICBreakpoint type. This option is disabled if there is not ICBreakpoint added to the platform breakpoint manager.

It would be nice if there is no restriction whether a breakpoint is ICBreakpoitn type or any breakpoint exist at all in the breakpoint manager, or at lease have an interface where breakpoint can implement to support this action's enablement.

Reproducible: Always
Comment 1 Patrick Chuong CLA 2011-02-03 16:32:06 EST
Created attachment 188278 [details]
patch

This patch introduced a property in the breakpoint. Another way is to introduce an interface. But since the SHOW_FULL_PATHS_PREF_KEY perference is internal, I didn't want to go with the interface approach. Infact, the interface would just be a blank interface, as long as the breakpoint implements the new interface, then fullpath action will be enabled.

John, Marc, what do you think?
Comment 2 Marc Khouzam CLA 2011-02-03 22:24:02 EST
For more information, you can look at bug 248627 comment 15 (which did not get implemented) and bug 248627 comment 22 (which was implemented).

I think the solution makes sense.

Comments on the patch:
1- the change should be in ShowFullPathsAction.java instead of ViewFilterAction.
2- ATTR_SUPPORT_FULL_PATHS should have full name e.g. org.eclipse.cdt....
Comment 3 John Cortell CLA 2011-02-04 09:20:46 EST
The comment on the new attribute should note that the show full path *action* is always enabled for ICBreakpoints, whether or not the attribute is present. It should also note that the action merely toggles a CDebugModelPresentation attribute, and that presentation may or may not be used for custom breakpoints. In other words, enabling the action alone does not necessarily provide the expected "show full path" behavior for a custom breakpoint.
Comment 4 Patrick Chuong CLA 2011-02-04 10:32:07 EST
Created attachment 188330 [details]
reworked patch

Thanks for reviewing this patch guys, I have updated the patch with your suggestions. I'll commit the patch after M5 is posted.
Comment 5 Patrick Chuong CLA 2011-02-07 14:50:44 EST
Committed to HEAD.