Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Inglis2004-10-22 14:42:59 +0000
committerDavid Inglis2004-10-22 14:42:59 +0000
commit2e47a2377bf7670379f743c2538b6fe03487c85d (patch)
treefb7ef5f1e757547d66acffcae4b31745cb3616cb /launch/org.eclipse.cdt.launch
parent51f2da030545cebda3e041e427619ba7a8335476 (diff)
downloadorg.eclipse.cdt-2e47a2377bf7670379f743c2538b6fe03487c85d.tar.gz
org.eclipse.cdt-2e47a2377bf7670379f743c2538b6fe03487c85d.tar.xz
org.eclipse.cdt-2e47a2377bf7670379f743c2538b6fe03487c85d.zip
added variable support to launching
Diffstat (limited to 'launch/org.eclipse.cdt.launch')
-rw-r--r--launch/org.eclipse.cdt.launch/ChangeLog13
-rw-r--r--launch/org.eclipse.cdt.launch/plugin.xml1
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java217
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java75
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties23
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LocalRunLaunchConfigurationTabGroup.java3
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/MigratingCEnvironmentTab.java45
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java452
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java89
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java13
10 files changed, 460 insertions, 471 deletions
diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog
index 7b62c72d096..b8fcc69524b 100644
--- a/launch/org.eclipse.cdt.launch/ChangeLog
+++ b/launch/org.eclipse.cdt.launch/ChangeLog
@@ -1,3 +1,16 @@
+2004-10-22 David Inglis
+ Added variables support to arguments, environment and working directory.
+
+ * plugin.xml
+ * src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
+ * src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java
+ * src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
+ * src/org/eclipse/cdt/launch/internal/ui/LocalRunLaunchConfigurationTabGroup.java
+ * src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
+ * src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
+ * src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
+ * src/org/eclipse/cdt/launch/internal/ui/MigratingCEnvironmentTab.java
+
2004-10-18 Alain Magloire
Adjust to changes in CDI
* src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java
diff --git a/launch/org.eclipse.cdt.launch/plugin.xml b/launch/org.eclipse.cdt.launch/plugin.xml
index 2972e8c4e8c..3f27e525229 100644
--- a/launch/org.eclipse.cdt.launch/plugin.xml
+++ b/launch/org.eclipse.cdt.launch/plugin.xml
@@ -25,6 +25,7 @@
<import plugin="org.eclipse.cdt.debug.ui"/>
<import plugin="org.eclipse.core.boot"/>
<import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.core.variables"/>
</requires>
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
index 6fdeb7787d8..bcb7c9d68fa 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
@@ -16,13 +16,11 @@ import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
-import java.util.Enumeration;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.Map.Entry;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.IBinaryParser;
@@ -36,7 +34,6 @@ import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.launch.internal.ui.LaunchMessages;
import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
-import org.eclipse.cdt.utils.spawner.EnvironmentReader;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
@@ -52,9 +49,13 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.core.model.IPersistableSourceLocator;
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
@@ -77,149 +78,21 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
* Return the save environment variables in the configuration. The array
* does not include the default environment of the target. array[n] :
* name=value
+ * @throws CoreException
*/
- protected String[] getEnvironmentArray(ILaunchConfiguration config) {
- Map env = null;
- try {
- env = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ENVIROMENT_MAP, (Map)null);
- } catch (CoreException e) {
- }
- if (env == null) {
- return new String[0];
- }
- String[] array = new String[env.size()];
- Iterator entries = env.entrySet().iterator();
- Entry entry;
- for (int i = 0; entries.hasNext() && i < array.length; i++) {
- entry = (Entry)entries.next();
- array[i] = ((String)entry.getKey()) + "=" + ((String)entry.getValue()); //$NON-NLS-1$
- }
- return array;
- }
-
- /**
- * Return the save environment variables of this configuration. The array
- * does not include the default environment of the target.
- */
- protected Properties getEnvironmentProperty(ILaunchConfiguration config) {
- Properties prop = new Properties();
- Map env = null;
+ protected String[] getEnvironmentArray(ILaunchConfiguration config) throws CoreException {
try {
- env = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ENVIROMENT_MAP, (Map)null);
+ // Migrate old env settings to new.
+ Map map = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ENVIROMENT_MAP, (Map)null);
+ if (map != null) {
+ ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
+ wc.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, map);
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ENVIROMENT_MAP, (Map)null);
+ wc.doSave();
+ }
} catch (CoreException e) {
- }
- if (env == null)
- return prop;
- Iterator entries = env.entrySet().iterator();
- Entry entry;
- while (entries.hasNext()) {
- entry = (Entry)entries.next();
- prop.setProperty((String)entry.getKey(), (String)entry.getValue());
- }
- return prop;
- }
-
- /**
- * Return the default Environment of the target.
- */
- protected Properties getDefaultEnvironment() {
- return EnvironmentReader.getEnvVars();
- }
-
- /**
- * Expand the variable with the format ${key}. example: HOME=/foobar NEWHOME =
- * ${HOME}/project The environement NEWHOME will be /foobar/project.
- */
- protected Properties expandEnvironment(ILaunchConfiguration config) {
- return expandEnvironment(getEnvironmentProperty(config));
- }
-
- /**
- * Expand the variable with the format ${key}. example: HOME=/foobar NEWHOME =
- * ${HOME}/project The environement NEWHOME will be /foobar/project.
- */
- protected Properties expandEnvironment(Properties props) {
- Enumeration names = props.propertyNames();
- if (names != null) {
- while (names.hasMoreElements()) {
- String key = (String)names.nextElement();
- String value = props.getProperty(key);
- if (value != null && value.indexOf('$') != -1) {
- StringBuffer sb = new StringBuffer();
- StringBuffer param = new StringBuffer();
- char prev = '\n';
- char ch = prev;
- boolean inMacro = false;
- boolean inSingleQuote = false;
-
- for (int i = 0; i < value.length(); i++) {
- ch = value.charAt(i);
- switch (ch) {
- case '\'' :
- if (prev != '\\') {
- inSingleQuote = !inSingleQuote;
- }
- break;
-
- case '$' :
- if (!inSingleQuote && prev != '\\') {
- if (i < value.length() && value.indexOf('}', i) > 0) {
- char c = value.charAt(i + 1);
- if (c == '{') {
- param.setLength(0);
- inMacro = true;
- prev = ch;
- continue;
- }
- }
- }
- break;
-
- case '}' :
- if (inMacro) {
- inMacro = false;
- String v = null;
- String p = param.toString();
- /*
- * Search in the current property only if it
- * is not the same name.
- */
- if (!p.equals(key)) {
- v = props.getProperty(p);
- }
- /* Fallback to the default Environemnt. */
- if (v == null) {
- Properties def = getDefaultEnvironment();
- if (def != null) {
- v = def.getProperty(p);
- }
- }
- if (v != null) {
- sb.append(v);
- }
- param.setLength(0);
- /* Skip the trailing } */
- prev = ch;
- continue;
- }
- break;
- } /* switch */
-
- if (!inMacro) {
- sb.append(ch);
- } else {
- /* Do not had the '{' */
- if (! (ch == '{' && prev == '$')) {
- param.append(ch);
- }
- }
- prev = (ch == '\\' && prev == '\\') ? '\n' : ch;
- } /* for */
- props.setProperty(key, sb.toString());
- } /* !if (value ..) */
- } /* while() */
- } /* if (names != null) */
- return props;
+ }
+ return DebugPlugin.getDefault().getLaunchManager().getEnvironment(config);
}
/**
@@ -253,10 +126,27 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
return verifyWorkingDirectory(configuration);
}
+ /**
+ * Expands and returns the working directory attribute of the given launch
+ * configuration. Returns <code>null</code> if a working directory is not
+ * specified. If specified, the working is verified to point to an existing
+ * directory in the local file system.
+ *
+ * @param configuration launch configuration
+ * @return an absolute path to a directory in the local file system, or
+ * <code>null</code> if unspecified
+ * @throws CoreException if unable to retrieve the associated launch
+ * configuration attribute, if unable to resolve any variables, or if the
+ * resolved location does not point to an existing directory in the local
+ * file system
+ */
protected IPath getWorkingDirectoryPath(ILaunchConfiguration config) throws CoreException {
- String path = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String)null);
- if (path != null) {
- return new Path(path);
+ String location = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String)null);
+ if (location != null) {
+ String expandedLocation = getStringVariableManager().performStringSubstitution(location);
+ if (expandedLocation.length() > 0) {
+ return new Path(expandedLocation);
+ }
}
return null;
}
@@ -316,6 +206,10 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
}
return new Path(path);
}
+
+ private static IStringVariableManager getStringVariableManager() {
+ return VariablesPlugin.getDefault().getStringVariableManager();
+ }
/**
* @param launch
@@ -371,7 +265,11 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
* @return the program arguments as a String
*/
public String getProgramArguments(ILaunchConfiguration config) throws CoreException {
- return config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String)null);
+ String args = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String)null);
+ if (args != null) {
+ args = getStringVariableManager().performStringSubstitution(args);
+ }
+ return args;
}
/**
@@ -545,7 +443,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
LaunchMessages.getString("AbstractCLaunchDelegate.Working_directory_does_not_exist"), //$NON-NLS-1$
new FileNotFoundException(
LaunchMessages.getFormattedString(
- "AbstractCLaunchDelegate.PROGRAM_PATH_not_found", path.toOSString())), //$NON-NLS-1$
+ "AbstractCLaunchDelegate.WORKINGDIRECTORY_PATH_not_found", path.toOSString())), //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_DOES_NOT_EXIST);
} else {
IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
@@ -556,7 +454,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
LaunchMessages.getString("AbstractCLaunchDelegate.Working_directory_does_not_exist"), //$NON-NLS-1$
new FileNotFoundException(
LaunchMessages.getFormattedString(
- "AbstractCLaunchDelegate.PROGRAM_PATH_does_not_exist", path.toOSString())), //$NON-NLS-1$
+ "AbstractCLaunchDelegate.WORKINGDIRECTORY_PATH_not_found", path.toOSString())), //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_DOES_NOT_EXIST);
}
}
@@ -869,4 +767,25 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
return null;
}
+ /**
+ * @param config
+ * @return
+ * @throws CoreException
+ */
+ protected Properties getEnvironmentProperty(ILaunchConfiguration config) throws CoreException {
+ String[] envp = getEnvironmentArray(config);
+ Properties p = new Properties( );
+ for( int i = 0; i < envp.length; i++ ) {
+ int idx = envp[i].indexOf('=');
+ if (idx != -1) {
+ String key = envp[i].substring(0, idx);
+ String value = envp[i].substring(idx + 1);
+ p.setProperty(key, value);
+ } else {
+ p.setProperty(envp[i], ""); //$NON-NLS-1$
+ }
+ }
+ return p;
+ }
+
} \ No newline at end of file
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java
index 5f1e18d8884..37f0ddde588 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalRunLaunchDelegate.java
@@ -12,8 +12,6 @@ import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Properties;
import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable;
import org.eclipse.cdt.core.model.ICProject;
@@ -67,32 +65,31 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate {
ICDebugConfiguration debugConfig = getDebugConfig(config);
ICDISession dsession = null;
String debugMode = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
- ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
+ ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) {
- dsession = debugConfig.createDebugger().createDebuggerSession(launch, exeFile, new SubProgressMonitor(monitor, 8));
+ dsession = debugConfig.createDebugger().createDebuggerSession(launch, exeFile,
+ new SubProgressMonitor(monitor, 8));
try {
- ICDITarget[] dtargets = dsession.getTargets();
- for (int i = 0; i < dtargets.length; ++i) {
- ICDIRuntimeOptions opt = dtargets[i].getRuntimeOptions();
- opt.setArguments(arguments);
- File wd = getWorkingDirectory(config);
- if (wd != null) {
- opt.setWorkingDirectory(wd.getAbsolutePath());
- }
- opt.setEnvironment(expandEnvironment(config));
- }
- } catch (CDIException e) {
try {
- dsession.terminate();
- } catch (CDIException ex) {
- // ignore
+ ICDITarget[] dtargets = dsession.getTargets();
+ for (int i = 0; i < dtargets.length; ++i) {
+ ICDIRuntimeOptions opt = dtargets[i].getRuntimeOptions();
+ opt.setArguments(arguments);
+ File wd = getWorkingDirectory(config);
+ if (wd != null) {
+ opt.setWorkingDirectory(wd.getAbsolutePath());
+ }
+ opt.setEnvironment(getEnvironmentProperty(config));
+ }
+ } catch (CDIException e) {
+ abort(
+ LaunchMessages
+ .getString("LocalRunLaunchDelegate.Failed_setting_runtime_option_though_debugger"), e, //$NON-NLS-1$
+ ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
}
- abort(LaunchMessages.getString("LocalRunLaunchDelegate.Failed_setting_runtime_option_though_debugger"), e, //$NON-NLS-1$
- ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
- monitor.worked(1);
- try {
- boolean stopInMain = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
+ monitor.worked(1);
+ boolean stopInMain = config
+ .getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
ICDITarget[] targets = dsession.getTargets();
for (int i = 0; i < targets.length; i++) {
@@ -102,7 +99,7 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate {
iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(exePath.toOSString()));
}
CDIDebugModel.newDebugTarget(launch, project.getProject(), targets[i], renderTargetLabel(debugConfig),
- iprocess, exeFile, true, false, stopInMain, true);
+ iprocess, exeFile, true, false, stopInMain, true);
}
} catch (CoreException e) {
try {
@@ -121,9 +118,9 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate {
ArrayList command = new ArrayList(1 + arguments.length);
command.add(exePath.toOSString());
command.addAll(Arrays.asList(arguments));
- String[] commandArray = (String[])command.toArray(new String[command.size()]);
+ String[] commandArray = (String[]) command.toArray(new String[command.size()]);
monitor.worked(5);
- Process process = exec(commandArray, getEnvironmentProperty(config), wd);
+ Process process = exec(commandArray, getEnvironmentArray(config), wd);
monitor.worked(3);
DebugPlugin.newProcess(launch, process, renderProcessLabel(commandArray[0]));
}
@@ -148,26 +145,14 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate {
* cancelled
* @see Runtime
*/
- protected Process exec(String[] cmdLine, Properties environ, File workingDirectory) throws CoreException {
+ protected Process exec(String[] cmdLine, String[] environ, File workingDirectory) throws CoreException {
Process p = null;
- Properties props = getDefaultEnvironment();
- props.putAll(expandEnvironment(environ));
- String[] envp = null;
- ArrayList envList = new ArrayList();
- Enumeration names = props.propertyNames();
- if (names != null) {
- while (names.hasMoreElements()) {
- String key = (String)names.nextElement();
- envList.add(key + "=" + props.getProperty(key)); //$NON-NLS-1$
- }
- envp = (String[])envList.toArray(new String[envList.size()]);
- }
try {
if (workingDirectory == null) {
- p = ProcessFactory.getFactory().exec(cmdLine, envp);
+ p = ProcessFactory.getFactory().exec(cmdLine, environ);
} else {
- p = ProcessFactory.getFactory().exec(cmdLine, envp, workingDirectory);
+ p = ProcessFactory.getFactory().exec(cmdLine, environ, workingDirectory);
}
} catch (IOException e) {
if (p != null) {
@@ -180,14 +165,14 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate {
// directory
IStatus status = new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(),
- ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_NOT_SUPPORTED,
- LaunchMessages.getString("LocalRunLaunchDelegate.Does_not_support_working_dir"), //$NON-NLS-1$
+ ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_NOT_SUPPORTED, LaunchMessages
+ .getString("LocalRunLaunchDelegate.Does_not_support_working_dir"), //$NON-NLS-1$
e);
IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(status);
if (handler != null) {
Object result = handler.handleStatus(status, this);
- if (result instanceof Boolean && ((Boolean)result).booleanValue()) {
+ if (result instanceof Boolean && ((Boolean) result).booleanValue()) {
p = exec(cmdLine, environ, null);
}
}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
index ee804842102..72b6ca40b49 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
@@ -14,11 +14,11 @@ AbstractCLaunchDelegate.C_Project_not_specified=C Project not specified
AbstractCLaunchDelegate.Not_a_C_CPP_project=Project is not a C/C++ project
AbstractCLaunchDelegate.Program_file_not_specified=Program file not specified
AbstractCLaunchDelegate.Program_file_does_not_exist=Program file does not exist
+AbstractCLaunchDelegate.PROGRAM_PATH_not_found={0} not found
AbstractCLaunchDelegate.Working_directory_does_not_exist=Working directory does not exist
+AbstractCLaunchDelegate.WORKINGDIRECTORY_PATH_not_found=The working directory {0} does not exist.
AbstractCLaunchDelegate.Project_NAME_does_not_exist=Project {0} does not exist
AbstractCLaunchDelegate.Project_NAME_is_closed=Project {0} is closed
-AbstractCLaunchDelegate.PROGRAM_PATH_not_found={0} not found
-AbstractCLaunchDelegate.PROGRAM_PATH_does_not_exist={0} Does not exist.
AbstractCLaunchDelegate.Debugger_Process=Debugger Process
AbstractCLaunchDelegate.building_projects=Building prerequisite project list
AbstractCLaunchDelegate.building=Building
@@ -121,16 +121,15 @@ CEnvironmentTab.Environment_variable_NAME_exists=Environment variable \" {0} \"
CArgumentsTab.C/C++_Program_Arguments=C/C++ Program Arguments:
CArgumentsTab.Arguments=Arguments
-WorkingDirectoryBlock.Wor&king_directory=Wor&king directory:
-WorkingDirectoryBlock.Use_de&fault_working_directory=Use de&fault working directory
-WorkingDirectoryBlock.&Local_directory=&Local directory
-WorkingDirectoryBlock.Works&pace=Works&pace
-WorkingDirectoryBlock.Select_&working_directory_for_launch_configuration=Select a &working directory for the launch configuration
-WorkingDirectoryBlock.Select_&workspace_relative_working_directory=Select a &workspace relative working directory
-WorkingDirectoryBlock.Working_directory_does_not_exist=Working directory does not exist
-WorkingDirectoryBlock.Working_directory_is_not_a_directory=Working directory is not a directory
-WorkingDirectoryBlock.Project_or_folder_does_not_exist=Specified project or folder does not exist.
-WorkingDirectoryBlock.Working_Directory=Working Directory
+WorkingDirectoryBlock.4=Select a &workspace relative working directory:
+WorkingDirectoryBlock.7=Select a working directory for the launch configuration:
+WorkingDirectoryBlock.0=W&orkspace...
+WorkingDirectoryBlock.Working_Directory_8=Working Directory
+WorkingDirectoryBlock.10=Working directory does not exist
+WorkingDirectoryBlock.Use_de&fault_working_directory_4=Use default wor&king directory
+WorkingDirectoryBlock.17=Variabl&es...
+WorkingDirectoryBlock.1=File S&ystem...
+WorkingDirectoryBlock.Exception_occurred_reading_configuration___15=Exception occurred reading configuration:
Launch.common.Exception_occurred_reading_configuration_EXCEPTION=Exception occurred reading configuration {0}
Launch.common.DebuggerColon=Debugger:
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LocalRunLaunchConfigurationTabGroup.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LocalRunLaunchConfigurationTabGroup.java
index 154aa25287d..ea687389af8 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LocalRunLaunchConfigurationTabGroup.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LocalRunLaunchConfigurationTabGroup.java
@@ -12,7 +12,6 @@ package org.eclipse.cdt.launch.internal.ui;
import org.eclipse.cdt.launch.ui.CArgumentsTab;
import org.eclipse.cdt.launch.ui.CDebuggerTab;
-import org.eclipse.cdt.launch.ui.CEnvironmentTab;
import org.eclipse.cdt.launch.ui.CMainTab;
import org.eclipse.cdt.launch.ui.CSourceLookupTab;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
@@ -29,7 +28,7 @@ public class LocalRunLaunchConfigurationTabGroup extends AbstractLaunchConfigura
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
new CMainTab(),
new CArgumentsTab(),
- new CEnvironmentTab(),
+ new MigratingCEnvironmentTab(),
new CDebuggerTab(false),
new CSourceLookupTab(),
new CommonTab()
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/MigratingCEnvironmentTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/MigratingCEnvironmentTab.java
new file mode 100644
index 00000000000..cadbe75a28a
--- /dev/null
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/MigratingCEnvironmentTab.java
@@ -0,0 +1,45 @@
+/*
+ * Created on Oct 21, 2004
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package org.eclipse.cdt.launch.internal.ui;
+
+import java.util.Map;
+
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.ui.EnvironmentTab;
+
+
+/**
+ * @author DInglis
+ * @deprecated - temporary class for while configs are migrated to new EnvironmentTab
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class MigratingCEnvironmentTab extends EnvironmentTab {
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.launch.ui.CEnvironmentTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public void initializeFrom(ILaunchConfiguration config) {
+ if (config instanceof ILaunchConfigurationWorkingCopy) {
+ ILaunchConfigurationWorkingCopy wc = (ILaunchConfigurationWorkingCopy) config;
+ try {