Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAlena Laskavaia2008-11-04 17:48:27 +0000
committerAlena Laskavaia2008-11-04 17:48:27 +0000
commitdfc64b12819d670df0f96e11477405009e783804 (patch)
tree7fedbb74ed2196835a58ff1526f64cbb138cc1a5 /build
parent33b9a3cc5d17e2379dd2a1df4093f8f2b88d6dd5 (diff)
downloadorg.eclipse.cdt-dfc64b12819d670df0f96e11477405009e783804.tar.gz
org.eclipse.cdt-dfc64b12819d670df0f96e11477405009e783804.tar.xz
org.eclipse.cdt-dfc64b12819d670df0f96e11477405009e783804.zip
[241072] - fixed parsing command line
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java26
1 files changed, 2 insertions, 24 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
index 80ea4ea4b81..da09931a130 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
@@ -29,6 +29,7 @@ import org.eclipse.cdt.internal.core.ConsoleOutputSniffer;
import org.eclipse.cdt.make.internal.core.MakeMessages;
import org.eclipse.cdt.make.internal.core.StreamMonitor;
import org.eclipse.cdt.make.internal.core.scannerconfig.ScannerInfoConsoleParserFactory;
+import org.eclipse.cdt.utils.CommandLineUtil;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -302,30 +303,7 @@ public class MakeBuilder extends ACBuilder {
// Turn the string into an array.
private String[] makeArray(String string) {
- string.trim();
- char[] array = string.toCharArray();
- ArrayList aList = new ArrayList();
- StringBuffer buffer = new StringBuffer();
- boolean inComment = false;
- for (int i = 0; i < array.length; i++) {
- char c = array[i];
- if (array[i] == '"' || array[i] == '\'') {
- if (i > 0 && array[i - 1] == '\\') {
- inComment = false;
- } else {
- inComment = !inComment;
- }
- }
- if (c == ' ' && !inComment) {
- aList.add(buffer.toString());
- buffer = new StringBuffer();
- } else {
- buffer.append(c);
- }
- }
- if (buffer.length() > 0)
- aList.add(buffer.toString());
- return (String[]) aList.toArray(new String[aList.size()]);
+ return CommandLineUtil.argumentsToArray(string);
}
private void removeAllMarkers(IProject currProject) throws CoreException {

Back to the top