Bug 102622 - Try following symlinks to find include files in the project
Summary: Try following symlinks to find include files in the project
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Alain Magloire CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-07-04 00:24 EDT by Robert O'Callahan CLA
Modified: 2008-06-19 13:05 EDT (History)
0 users

See Also:


Attachments
fix (2.65 KB, patch)
2005-07-04 00:29 EDT, Robert O'Callahan CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert O'Callahan CLA 2005-07-04 00:24:46 EDT
When the user tries to follow an include file via the UI, OpenIncludeAction
gathers a list of candidates and if there's only one, opens it automatically. In
our project the build process fills a "dist/include" directory with symlinks to
a number of include files in the project proper and that directory is added as a
-I parameter. It is quite common for the same file to end up accessible both via
normal include path searching and dist/include. This stops Eclipse from
automatically navigating to the file.
Comment 1 Robert O'Callahan CLA 2005-07-04 00:29:33 EDT
Created attachment 24314 [details]
fix

This patch fixes the issue. When we find a candidate include file in the
include paths, if it's not in the workspace but it's a symlink to a file that
is in the workspace, we use the workspace file instead. We also throw out
duplicate files.

As well as fixing the automatic following behaviour, it also means that if a
symlink to a project include file is found in the include paths, we will open
the project include file, not the symlink. This is quite helpful.
Comment 2 Alain Magloire CLA 2005-07-06 10:55:03 EDT
(In reply to comment #1)
> 
> This patch fixes the issue. When we find a candidate include file in the
> include paths, if it's not in the workspace but it's a symlink to a file that
> is in the workspace, we use the workspace file instead. We also throw out
> duplicate files.
> 
> This is quite helpful.


Yes, it sounds that it could be.
Comment 3 Alain Magloire CLA 2005-07-06 10:56:47 EDT
Patch in the head.
Please take time to verify this.

Thanks