1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-02 22:05:44 +02:00

bug 243170: Changes 1.9 undone as it causes regression, i.e. relative paths stop being evaluated from project root

This commit is contained in:
Andrew Gvozdev 2009-07-17 14:15:39 +00:00
parent 5a61ecb698
commit 8bef66b111

View file

@ -234,17 +234,19 @@ public class DescriptionScannerInfoProvider implements IScannerInfoProvider, ICP
if(p == null) if(p == null)
continue; continue;
//TODO: obtain location from pathEntries when entries are resolved //TODO: obtain location from pathEntries when entries are resolved
path = new Path(p);//pathEntries[i].getLocation(); path = new Path(p);//p.getLocation();
if(pathEntry.isValueWorkspacePath()){ if(pathEntry.isValueWorkspacePath()){
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IResource rc = root.findMember(path); IResource rc = root.findMember(path);
if(rc != null){ if(rc != null){
path = rc.getLocation(); path = rc.getLocation();
} }
} } else if (!path.isAbsolute()) {
// do not make paths absolute, that's the preprocessor's job and is done differently IPath projLocation = fProject != null ? fProject.getLocation() : null;
// depending on the entry if(projLocation != null)
if(path != null) path = projLocation.append(path);
}
if(path != null)
values[num++] = path.toOSString(); values[num++] = path.toOSString();
} }