* fix
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/AbstractInterpreterInstallType.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/AbstractInterpreterInstallType.java
index 4f1ccf3..cc9d133 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/AbstractInterpreterInstallType.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/AbstractInterpreterInstallType.java
@@ -471,6 +471,10 @@
cmdLine = buildCommandLine(installLocation, pathFile);
try {
+ if (DLTKLaunchingPlugin.TRACE_EXECUTION) {
+ traceExecution("Tcl library discovery script", cmdLine,
+ env);
+ }
process = DebugPlugin.exec(cmdLine, null, env);
if (process != null) {
String result[] = readPathsFromProcess(monitor, process);
@@ -506,7 +510,24 @@
monitor.done();
}
}
-
+ private void traceExecution(String processLabel,
+ String[] cmdLineLabel, String[] environment) {
+ StringBuffer sb = new StringBuffer();
+ sb.append("-----------------------------------------------\n");
+ sb.append("Running ").append(processLabel).append('\n');
+// sb.append("Command line: ").append(cmdLineLabel).append('\n');
+ sb.append("Command line: ");
+ for (int i = 0; i < cmdLineLabel.length; i++) {
+ sb.append(" " + cmdLineLabel[i]);
+ }
+ sb.append("\n");
+ sb.append("Environment:\n");
+ for (int i=0; i<environment.length; i++) {
+ sb.append('\t').append(environment[i]).append('\n');
+ }
+ sb.append("-----------------------------------------------\n");
+ System.out.println(sb);
+ }
protected IRunnableWithProgress createLookupRunnable(
final File installLocation, final List locations,
final EnvironmentVariable[] variables) {
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractInterpreterRunner.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractInterpreterRunner.java
index 06284f5..681ec0e 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractInterpreterRunner.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractInterpreterRunner.java
@@ -205,7 +205,7 @@
IProcess process = newProcess(launch, p, processLabel,
getDefaultProcessMap());
process.setAttribute(IProcess.ATTR_CMDLINE, cmdLineLabel);
- return process;
+ return process;
}
private void traceExecution(String processLabel,
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/ScriptLaunchUtil.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/ScriptLaunchUtil.java
index 66dbab3..382fa3c 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/ScriptLaunchUtil.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/ScriptLaunchUtil.java
@@ -21,6 +21,7 @@
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.Launch;
import org.eclipse.dltk.core.IScriptProject;
+import org.eclipse.dltk.internal.launching.DLTKLaunchingPlugin;
public class ScriptLaunchUtil {
// Create file with script content
@@ -64,8 +65,30 @@
if (workingDirectoryPath != null) {
file = workingDirectoryPath.toFile();
}
+ if (DLTKLaunchingPlugin.TRACE_EXECUTION) {
+ traceExecution("runScript with interpreter", cmdLine,
+ environmentAsStrings);
+ }
return DebugPlugin.exec(cmdLine, file, environmentAsStrings);
}
+ private static void traceExecution(String processLabel,
+ String[] cmdLineLabel, String[] environment) {
+ StringBuffer sb = new StringBuffer();
+ sb.append("-----------------------------------------------\n");
+ sb.append("Running ").append(processLabel).append('\n');
+// sb.append("Command line: ").append(cmdLineLabel).append('\n');
+ sb.append("Command line: ");
+ for (int i = 0; i < cmdLineLabel.length; i++) {
+ sb.append(cmdLineLabel[i]);
+ }
+ sb.append("\n");
+ sb.append("Environment:\n");
+ for (int i=0; i<environment.length; i++) {
+ sb.append('\t').append(environment[i]).append('\n');
+ }
+ sb.append("-----------------------------------------------\n");
+ System.out.println(sb);
+ }
public static Process runScriptWithInterpreter(String interpreter,
File scriptFile, File workingDirectory, String[] interpreterArgs,