Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340536 - Handle multiple include file candidates more intelligently
Summary: Handle multiple include file candidates more intelligently
Status: RESOLVED WONTFIX
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-20 22:23 EDT by Jonathan Watt CLA
Modified: 2011-03-28 08:52 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Watt CLA 2011-03-20 22:23:50 EDT
Build Identifier: 

This is a problem when using Eclipse as an IDE for larger projects like Mozilla. In the case of Mozilla, headers from one module that need to be used by other modules are copied into a common include directory. Adding this directory to the include path in Eclipse unfortunately give Eclipse problems when analyzing the source files in a module's directory where those files use headers in that directory that have also been copied to the common project-wide Mozilla include directory.

It seems like Eclipse should just choose one of the matching header files - preferably the one in the same directory as the source file at hand.

Reproducible: Always
Comment 1 Markus Schorn CLA 2011-03-28 08:52:17 EDT
If the parser finds a header on the include search path it uses it (Any other behavior is not acceptable).
If the parser does not find the header on the search path, then it uses the one that is closeest to the file that includes the header. You may be able to solve the issue by removing the common include folder from the include search path.