Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/runners
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2535/src/org/python/pydev/runners
Modified Files:
SimpleRunner.java SimplePythonRunner.java
Log Message:
[PATCH] completion server does not work when the eclipse directory contains spaces
Index: SimpleRunner.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/runners/SimpleRunner.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** SimpleRunner.java 12 May 2008 11:34:00 -0000 1.23
--- SimpleRunner.java 12 May 2008 11:39:06 -0000 1.24
***************
*** 40,43 ****
--- 40,47 ----
}
+ public Process createProcess(String[] parameters, File workingDir) throws IOException {
+ return Runtime.getRuntime().exec(parameters, null, workingDir);
+ }
+
/**
* THIS CODE IS COPIED FROM org.eclipse.debug.internal.core.LaunchManager
***************
*** 297,300 ****
--- 301,308 ----
}
+ public Tuple<String,String> runAndGetOutput(String[] arguments, File workingDir, IProject project) {
+ return runAndGetOutput(arguments, workingDir, project, new NullProgressMonitor());
+ }
+
/**
* shortcut
Index: SimplePythonRunner.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/runners/SimplePythonRunner.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** SimplePythonRunner.java 12 May 2008 11:34:00 -0000 1.10
--- SimplePythonRunner.java 12 May 2008 11:39:06 -0000 1.11
***************
*** 42,47 ****
*/
public Tuple<String,String> runAndGetOutput(String script, String[] args, File workingDir, IProject project) {
! String executionString = makeExecutableCommandStr(script, args);
! return runAndGetOutput(executionString, workingDir, project);
}
--- 42,47 ----
*/
public Tuple<String,String> runAndGetOutput(String script, String[] args, File workingDir, IProject project) {
! String[] parameters = addInterpreterToArgs(script, args);
! return runAndGetOutput(parameters, workingDir, project);
}
***************
*** 52,60 ****
*/
public static String makeExecutableCommandStr(String script, String[] args) {
! String interpreter = PydevPlugin.getPythonInterpreterManager().getDefaultInterpreter();
! String[] s = preparePythonCallParameters(interpreter, script, args);
return getCommandLineAsString(s, args);
}
/**
* Execute the string and format for windows if we have spaces...
--- 52,64 ----
*/
public static String makeExecutableCommandStr(String script, String[] args) {
! String[] s = addInterpreterToArgs(script, args);
return getCommandLineAsString(s, args);
}
+ private static String[] addInterpreterToArgs(String script, String[] args) {
+ String interpreter = PydevPlugin.getPythonInterpreterManager().getDefaultInterpreter();
+ return preparePythonCallParameters(interpreter, script, args);
+ }
+
/**
* Execute the string and format for windows if we have spaces...
|