mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 04:15:35 +02:00
Symbolic links in include search path, bug 246524.
This commit is contained in:
parent
6f6afbdada
commit
4e8f520b7c
1 changed files with 7 additions and 4 deletions
|
@ -39,8 +39,6 @@ import org.eclipse.core.runtime.Path;
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
*/
|
*/
|
||||||
public class ProjectIndexerInputAdapter extends IndexerInputAdapter {
|
public class ProjectIndexerInputAdapter extends IndexerInputAdapter {
|
||||||
private final static boolean CASE_SENSITIVE_FILES= !new File("a").equals(new File("A")); //$NON-NLS-1$//$NON-NLS-2$
|
|
||||||
|
|
||||||
private final ICProject fCProject;
|
private final ICProject fCProject;
|
||||||
private final HashMap<String, IIndexFileLocation> fIflCache;
|
private final HashMap<String, IIndexFileLocation> fIflCache;
|
||||||
private final FileExistsCache fExistsCache;
|
private final FileExistsCache fExistsCache;
|
||||||
|
@ -89,7 +87,7 @@ public class ProjectIndexerInputAdapter extends IndexerInputAdapter {
|
||||||
IIndexFileLocation result= fIflCache.get(includePath);
|
IIndexFileLocation result= fIflCache.get(includePath);
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
result = doResolveASTPath(includePath);
|
result = doResolveASTPath(includePath);
|
||||||
if (result.getFullPath() == null && !CASE_SENSITIVE_FILES) {
|
if (result.getFullPath() == null) {
|
||||||
try {
|
try {
|
||||||
File location= new File(includePath);
|
File location= new File(includePath);
|
||||||
String canonicalPath= location.getCanonicalPath();
|
String canonicalPath= location.getCanonicalPath();
|
||||||
|
@ -202,6 +200,11 @@ public class ProjectIndexerInputAdapter extends IndexerInputAdapter {
|
||||||
@Override
|
@Override
|
||||||
public CodeReader getCodeReader(Object tuo) {
|
public CodeReader getCodeReader(Object tuo) {
|
||||||
ITranslationUnit tu= (ITranslationUnit) tuo;
|
ITranslationUnit tu= (ITranslationUnit) tuo;
|
||||||
return tu.getCodeReader();
|
final CodeReader reader= tu.getCodeReader();
|
||||||
|
if (reader != null) {
|
||||||
|
IIndexFileLocation ifl= IndexLocationFactory.getIFL(tu);
|
||||||
|
fIflCache.put(reader.getPath(), ifl);
|
||||||
|
}
|
||||||
|
return reader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue