diff options
author | Eugene Tarassov | 2015-05-11 21:18:35 +0000 |
---|---|---|
committer | Eugene Tarassov | 2015-05-11 21:18:35 +0000 |
commit | 375546a9bb4d87ec837aec6ac3ffd04a7081a6a8 (patch) | |
tree | 5901d07ecbc5c0c447b683792c56b7f21b06deca | |
parent | 216fec3b0820a4bcf3cd58dd98d2382e77025b0b (diff) | |
download | org.eclipse.tcf-375546a9bb4d87ec837aec6ac3ffd04a7081a6a8.tar.gz org.eclipse.tcf-375546a9bb4d87ec837aec6ac3ffd04a7081a6a8.tar.xz org.eclipse.tcf-375546a9bb4d87ec837aec6ac3ffd04a7081a6a8.zip |
TCF Debugger: fixed: Command line argument variable is not evaluated
-rw-r--r-- | plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF | 3 | ||||
-rw-r--r-- | plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java | 20 |
2 files changed, 19 insertions, 4 deletions
diff --git a/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF index 79f53b1c5..684bbaf03 100644 --- a/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF @@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.core.filesystem;bundle-version="1.3.200", org.eclipse.core.runtime;bundle-version="3.8.0", org.eclipse.core.resources;bundle-version="3.8.1", org.eclipse.debug.core;bundle-version="3.7.100" -Import-Package: org.eclipse.tcf.core;version="1.3.0", +Import-Package: org.eclipse.core.variables, + org.eclipse.tcf.core;version="1.3.0", org.eclipse.tcf.protocol;version="1.3.0", org.eclipse.tcf.services;version="1.3.0", org.eclipse.tcf.util;version="1.3.0" diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java index 648409a14..acdc8a653 100644 --- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java +++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java @@ -27,6 +27,7 @@ import java.util.Set; import org.eclipse.core.resources.IStorage; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.variables.VariablesPlugin; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunchConfiguration; @@ -840,8 +841,20 @@ public class TCFLaunch extends Launch { // Start the process new LaunchStep() { @Override - void start() { - if (env != null) process_env.putAll(env); + void start() throws Exception { + if (env != null) { + for (Map.Entry<String,String> e : env.entrySet()) { + String key = e.getKey(); + String val = e.getValue(); + if (val == null) { + process_env.remove(key); + } + else { + val = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(val); + process_env.put(key, val); + } + } + } String file = remote_file; if (file == null || file.length() == 0) file = TCFLaunchDelegate.getProgramPath(project, local_file); if (file == null || file.length() == 0) { @@ -866,7 +879,8 @@ public class TCFLaunch extends Launch { } }; if (launch_monitor != null) launch_monitor.subTask("Starting: " + file); - String[] args_arr = toArgsArray(file, args); + String cmd = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(args); + String[] args_arr = toArgsArray(file, cmd); if (ps_v1 != null) { Map<String,Object> params = new HashMap<String,Object>(); if (mode.equals(ILaunchManager.DEBUG_MODE)) { |