From 8bef66b111b53b27f3447779706d3a6460a7ce0e Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Fri, 17 Jul 2009 14:15:39 +0000 Subject: [PATCH] bug 243170: Changes 1.9 undone as it causes regression, i.e. relative paths stop being evaluated from project root --- .../model/DescriptionScannerInfoProvider.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java index bfac6f7ad24..f86fd71c292 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java @@ -234,17 +234,19 @@ public class DescriptionScannerInfoProvider implements IScannerInfoProvider, ICP if(p == null) continue; //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()){ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IResource rc = root.findMember(path); if(rc != null){ path = rc.getLocation(); } - } - // do not make paths absolute, that's the preprocessor's job and is done differently - // depending on the entry - if(path != null) + } else if (!path.isAbsolute()) { + IPath projLocation = fProject != null ? fProject.getLocation() : null; + if(projLocation != null) + path = projLocation.append(path); + } + if(path != null) values[num++] = path.toOSString(); }