[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Build Command double quotes.
|
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/ChangeLog,v
retrieving revision 1.52
diff -u -r1.52 ChangeLog
--- ChangeLog 23 Jan 2003 16:49:36 -0000 1.52
+++ ChangeLog 24 Jan 2003 20:38:31 -0000
@@ -1,3 +1,9 @@
+2003-01-24 Alain Magloire
+
+ * src/org/eclipse/cdt/ui/wizards/SettingsBlock.java (doRung):
+ Check for program that are quoted.
+ This patch was base on previous proposed by Alex Chapiro.
+
2003-01-21 Alain Magloire
* src/org/eclipse/cdt/internal/ui/cview/CViewSorter.java (category):
Index: src/org/eclipse/cdt/ui/wizards/SettingsBlock.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/SettingsBlock.java,v
retrieving revision 1.3
diff -u -r1.3 SettingsBlock.java
--- src/org/eclipse/cdt/ui/wizards/SettingsBlock.java 29 Oct 2002 21:40:58 -0000 1.3
+++ src/org/eclipse/cdt/ui/wizards/SettingsBlock.java 24 Jan 2003 20:38:31 -0000
@@ -74,14 +74,15 @@
useDefaultBuildCmd = nature.isDefaultBuildCmd();
if (!useDefaultBuildCmd) {
buildCmd = nature.getBuildCommand().toOSString();
+ if (buildCmd.indexOf(' ') > 0) {
+ buildCmd = "\"" + buildCmd + "\"";
+ }
buildCmd += " " + nature.getFullBuildArguments();
}
}
+ } catch (CoreException e) {
}
- catch (CoreException e) {
- }
- }
- else {
+ } else {
// FIXME: Should use the default settings
stopOnError = false;
useDefaultBuildCmd = true;
@@ -197,17 +198,24 @@
nature.setBuildCommandOverride(useDefaultBuildCmd());
if (!useDefaultBuildCmd()) {
String bldLine = getBuildLine();
- int start = bldLine.indexOf(' ');
+ int start = 0;
+ int end = -1;
+ if (!bldLine.startsWith("\"")) {
+ end = bldLine.indexOf(' ');
+ } else {
+ start = 1;
+ end = bldLine.indexOf('"', 1);
+ }
IPath path;
- if ( start == -1 ) {
+ if (end == -1) {
path = new Path(bldLine);
} else {
- path = new Path(bldLine.substring(0, start));
+ path = new Path(bldLine.substring(start, end));
}
nature.setBuildCommand(path, new SubProgressMonitor(monitor, 50));
String args = "";
- if ( start != -1 ) {
- args = bldLine.substring(start + 1);
+ if (end != -1) {
+ args = bldLine.substring(end + 1);
}
nature.setFullBuildArguments(args, new SubProgressMonitor(monitor, 50));
}