diff options
author | Andrew Gvozdev | 2011-08-18 16:14:13 +0000 |
---|---|---|
committer | Andrew Gvozdev | 2011-08-18 17:41:01 +0000 |
commit | d5d717128b47835cfbb5a4623d977bfbb2edd925 (patch) | |
tree | e181eec4ab4f88351617ec961885df1960c767a4 /build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal | |
parent | 950f133f77d2f390e9a069015aa4c64e776a9d03 (diff) | |
download | org.eclipse.cdt-d5d717128b47835cfbb5a4623d977bfbb2edd925.tar.gz org.eclipse.cdt-d5d717128b47835cfbb5a4623d977bfbb2edd925.tar.xz org.eclipse.cdt-d5d717128b47835cfbb5a4623d977bfbb2edd925.zip |
bug 345750: tidy up cosmetics
Diffstat (limited to 'build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal')
-rw-r--r-- | build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java | 20 |
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 2c331364dad..f2063438522 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; } |