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

Bug 348039

Summary: When creating new class project header file is treated as system include
Product: [Tools] CDT Reporter: Sergey Prigogin <eclipse.sprigogin>
Component: cdt-editorAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0Flags: eclipse.sprigogin: iplog-
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix eclipse.sprigogin: iplog-

Description Sergey Prigogin CLA 2011-06-01 22:43:10 EDT
The logic in NewClassCodeGenerator.getHeaderIncludeString method is based on projectLocation.isPrefixOf(headerLocation) condition that does not take linked folders into account. When the files for the new class are created under a linked folder, the include statement in the generated source file is created with angle brackets instead of quotes.
Comment 1 Sergey Prigogin CLA 2011-06-01 22:46:45 EDT
Created attachment 197212 [details]
Fix

To reduce risk associated with this change I didn't attempt to clean up the logic in NewClassCodeGenerator.getHeaderIncludeString, but instead added a simple additional condition to existing code that prevents creation of system includes for header files inside workspace.
Comment 2 Sergey Prigogin CLA 2011-06-01 22:47:58 EDT
Fixed in HEAD > 20110601.
Comment 3 CDT Genie CLA 2011-06-01 23:23:04 EDT
*** cdt cvs genie on behalf of sprigogin ***
Bug 348039 - When creating new class project header file is treated as system include.

[*] NewClassCodeGenerator.java 1.34 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java?root=Tools_Project&r1=1.33&r2=1.34