|
Lines 1-5
Link Here
|
| 1 |
/********************************************************************** |
1 |
/********************************************************************** |
| 2 |
* Copyright (c) 2006 Nokia and others. |
2 |
* Copyright (c) 2006, 2010 Nokia and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 7-12
Link Here
|
| 7 |
* |
7 |
* |
| 8 |
* Contributors: |
8 |
* Contributors: |
| 9 |
* Nokia - Initial API and implementation |
9 |
* Nokia - Initial API and implementation |
|
|
10 |
* Marc-Andre Laperle - fix for bug 263689 (spaces in directory) |
| 10 |
***********************************************************************/ |
11 |
***********************************************************************/ |
| 11 |
package org.eclipse.cdt.debug.mi.core.command.factories.macos; |
12 |
package org.eclipse.cdt.debug.mi.core.command.factories.macos; |
| 12 |
|
13 |
|
|
Lines 16-28
Link Here
|
| 16 |
|
17 |
|
| 17 |
public MacOSMIEnvironmentCD(String miVersion, String path) { |
18 |
public MacOSMIEnvironmentCD(String miVersion, String path) { |
| 18 |
super(miVersion, path); |
19 |
super(miVersion, path); |
| 19 |
this.setOperation("cd");//$NON-NLS-1$ |
20 |
this.setOperation("-environment-cd");//$NON-NLS-1$ |
| 20 |
} |
21 |
} |
| 21 |
|
22 |
|
| 22 |
protected String parametersToString() { |
23 |
protected String parametersToString() { |
| 23 |
String[] parameters = getParameters(); |
24 |
String[] parameters = getParameters(); |
| 24 |
if (parameters != null && parameters.length == 1) { |
25 |
if (parameters != null && parameters.length == 1) { |
| 25 |
return '"' + parameters[0] + '"'; |
26 |
// To handle spaces in the path, the command string has this format: |
|
|
27 |
// -environment-cd "\"/path with spaces\"" |
| 28 |
return "\"\\\"" + parameters[0] + "\\\"\""; //$NON-NLS-1$ //$NON-NLS-2$ |
| 26 |
} |
29 |
} |
| 27 |
return super.parametersToString(); |
30 |
return super.parametersToString(); |
| 28 |
} |
31 |
} |