Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2015-07-15 09:13:08 -0400
committerAnton Leherbauer2015-07-15 09:13:19 -0400
commit61a8c233ac900a2bfd1c495e8b7f673ff38a4552 (patch)
treed875dcc52dfd70b2f2b20cf184cc847ebb1bbfe9 /target_explorer
parent6cafa394e3093e2b50384a39b2f05148091887ad (diff)
downloadorg.eclipse.tcf-61a8c233ac900a2bfd1c495e8b7f673ff38a4552.tar.gz
org.eclipse.tcf-61a8c233ac900a2bfd1c495e8b7f673ff38a4552.tar.xz
org.eclipse.tcf-61a8c233ac900a2bfd1c495e8b7f673ff38a4552.zip
Target Explorer: Add Environment tab also to run launch
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java12
3 files changed, 22 insertions, 5 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml
index a50feed5e..f6225dbbd 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml
@@ -62,7 +62,15 @@ Anna Dushistova (MontaVista) - adapted from org.eclipse.cdt.launch.remote
name="Arguments"
class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CArgumentsTab">
<associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.run"/>
- <placement after="org.eclipse.tcf.te.remotecdt.run.mainTab"/>
+ <placement after="org.eclipse.tcf.te.remotecdt.debug.mainTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.tcf.te.remotecdt.run.environmentTab"
+ group="org.eclipse.cdt.launch.remoteApplicationRunLaunchTabGroup"
+ name="Environment"
+ class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TEEnvironmentTab">
+ <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.run"/>
+ <placement after="org.eclipse.cdt.dsf.gdb.launch.argumentsTab"/>
</tab>
<tab
id="org.eclipse.tcf.te.remotecdt.CommonTab"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
index 19aa36f08..c20452257 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
@@ -10,6 +10,7 @@
package org.eclipse.tcf.te.tcf.launch.cdt.launching;
import java.io.IOException;
+import java.util.Map;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.debug.core.CDebugUtils;
@@ -22,6 +23,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.osgi.util.NLS;
import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.te.runtime.callback.Callback;
@@ -59,9 +61,10 @@ public class TERunLaunchDelegate extends AbstractCLaunchDelegate {
monitor.setTaskName(Messages.TEGdbAbstractLaunchDelegate_starting_debugger);
String arguments = getProgramArguments(config);
String prelaunchCmd = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, ""); //$NON-NLS-1$
+ Map<String,String> env = config.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, (Map<String,String>)null);
TEHelper.launchCmd(peer, null, prelaunchCmd, null, new SubProgressMonitor(monitor, 2), new Callback());
- new TERunProcess(launch, remoteExePath, arguments, renderProcessLabel(exePath.toOSString()), peer, new SubProgressMonitor(monitor, 20));
+ new TERunProcess(launch, remoteExePath, arguments, env, renderProcessLabel(exePath.toOSString()), peer, new SubProgressMonitor(monitor, 20));
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java
index 7c221f425..09027c445 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java
@@ -13,6 +13,7 @@
package org.eclipse.tcf.te.tcf.launch.cdt.utils;
import java.util.EventObject;
+import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
@@ -49,7 +50,12 @@ public class TERunProcess extends PlatformObject implements IProcess,
private int exitValue;
public TERunProcess(ILaunch launch, String remoteExePath, String arguments,
- String label, IPeer peer, SubProgressMonitor monitor) {
+ String label, IPeer peer, SubProgressMonitor monitor) {
+ this(launch, remoteExePath, arguments, null, label, peer, monitor);
+ }
+
+ public TERunProcess(ILaunch launch, String remoteExePath, String arguments,
+ Map<String, String> env, String label, IPeer peer, SubProgressMonitor monitor) {
this.launch = launch;
// initializeAttributes(attributes);
prName = remoteExePath;
@@ -58,8 +64,8 @@ public class TERunProcess extends PlatformObject implements IProcess,
EventManager.getInstance().addEventListener(this,
ProcessStateChangeEvent.class);
try {
- prLauncher = TEHelper.launchCmd(peer, null, remoteExePath, arguments,
- null, monitor, new Callback());
+ prLauncher = TEHelper.launchCmdWithEnv(peer, null, remoteExePath, arguments,
+ env, null, monitor, new Callback());
} catch (CoreException e) {
Activator.getDefault().getLog().log(
new Status(IStatus.ERROR, Activator.getUniqueIdentifier(),

Back to the top