Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348039 - When creating new class project header file is treated as system include
Summary: When creating new class project header file is treated as system include
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Sergey Prigogin CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 22:43 EDT by Sergey Prigogin CLA
Modified: 2011-06-01 23:23 EDT (History)
1 user (show)

See Also:
eclipse.sprigogin: iplog-


Attachments
Fix (1.16 KB, patch)
2011-06-01 22:46 EDT, Sergey Prigogin CLA
eclipse.sprigogin: iplog-
Details | Diff

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