summaryrefslogtreecommitdiffstats
authorAndrew Gvozdev2011-08-18 12:14:13 (EDT)
committer Andrew Gvozdev2011-08-18 13:43:57 (EDT)
commit54caae0c7a3af39f7d35785f6afc3a018e159d34 (patch) (side-by-side diff)
tree6a310e8dcf34c11d6606a8c1c3019ffd3a981192
parent656f825db02388ef78e277570d0af5e225ed31f3 (diff)
downloadorg.eclipse.cdt-54caae0c7a3af39f7d35785f6afc3a018e159d34.zip
org.eclipse.cdt-54caae0c7a3af39f7d35785f6afc3a018e159d34.tar.gz
org.eclipse.cdt-54caae0c7a3af39f7d35785f6afc3a018e159d34.tar.bz2
bug 345750: tidy up cosmetics
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java20
1 files changed, 7 insertions, 13 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
index 2c33136..f206343 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
@@ -224,26 +224,16 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
* @return filePath : IPath - not <code>null</code>
*/
public IPath getAbsolutePath(String filePath) {
- IPath p = getAbsolutePath2(filePath);
- if (p.getDevice()==null) {
- p = p.setDevice(getWorkingDirectory().getDevice());
- }
- return p;
- }
-
- private IPath getAbsolutePath2(String filePath) {
IPath pFilePath;
if (filePath.startsWith("/")) { //$NON-NLS-1$
- return convertCygpath(new Path(filePath));
- }
- else if (filePath.startsWith("\\") || //$NON-NLS-1$
+ pFilePath = convertCygpath(new Path(filePath));
+ } else if (filePath.startsWith("\\") || //$NON-NLS-1$
(!filePath.startsWith(".") && //$NON-NLS-1$
filePath.length() > 2 && filePath.charAt(1) == ':' &&
(filePath.charAt(2) == '\\' || filePath.charAt(2) == '/'))) {
// absolute path
pFilePath = new Path(filePath);
- }
- else {
+ } else {
// relative path
IPath cwd = getWorkingDirectory();
if (!cwd.isAbsolute()) {
@@ -259,6 +249,10 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
}
pFilePath = cwd.append(filePath);
}
+
+ if (pFilePath.getDevice()==null) {
+ pFilePath = pFilePath.setDevice(getWorkingDirectory().getDevice());
+ }
return pFilePath;
}