summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-09-05 12:01:09 (EDT)
committer Mike Rennie2012-09-05 12:01:09 (EDT)
commitb1c4d1bf43987166eb09b71cb584335481ef878e (patch)
treea2ad2a74eb1e5b07b71b79be2ef58c3246be49e5
parent37410bf06424223bef4bc96185dfe5a74fce903e (diff)
downloadeclipse.jdt.debug-b1c4d1bf43987166eb09b71cb584335481ef878e.zip
eclipse.jdt.debug-b1c4d1bf43987166eb09b71cb584335481ef878e.tar.gz
eclipse.jdt.debug-b1c4d1bf43987166eb09b71cb584335481ef878e.tar.bz2
Bug 387504 - Bugs in program argument parsing (compared to command line)v20120905-160109
-rw-r--r--org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java27
1 files changed, 1 insertions, 26 deletions
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java
index 180b429..4e6a77d 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java
@@ -84,32 +84,7 @@ public class StandardVMRunner extends AbstractVMRunner {
* @return the command line label
*/
protected String renderCommandLine(String[] commandLine) {
- if (commandLine.length < 1)
- return ""; //$NON-NLS-1$
- StringBuffer buf= new StringBuffer();
- for (int i= 0; i < commandLine.length; i++) {
- buf.append(' ');
- char[] characters= commandLine[i].toCharArray();
- StringBuffer command= new StringBuffer();
- boolean containsSpace= false;
- for (int j = 0; j < characters.length; j++) {
- char character= characters[j];
- if (character == '\"') {
- command.append('\\');
- } else if (character == ' ') {
- containsSpace = true;
- }
- command.append(character);
- }
- if (containsSpace) {
- buf.append('\"');
- buf.append(command.toString());
- buf.append('\"');
- } else {
- buf.append(command.toString());
- }
- }
- return buf.toString();
+ return DebugPlugin.renderArguments(commandLine, null);
}
/**