Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorKen Ryall2007-12-31 21:28:04 +0000
committerKen Ryall2007-12-31 21:28:04 +0000
commit5a24329e7cd5f4d3aad6acb2ad6f3b304a33729b (patch)
treeb5c6c1ee922ab5410bb1ecd0202907456aeb03d9 /launch
parente8019df50455830ddc2b4079aad378335d3f72a2 (diff)
downloadorg.eclipse.cdt-5a24329e7cd5f4d3aad6acb2ad6f3b304a33729b.tar.gz
org.eclipse.cdt-5a24329e7cd5f4d3aad6acb2ad6f3b304a33729b.tar.xz
org.eclipse.cdt-5a24329e7cd5f4d3aad6acb2ad6f3b304a33729b.zip
Merge from cdt_40.
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
index 80cbc574831..8b34a794d5c 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
@@ -290,12 +290,17 @@ public class CMainTab extends CLaunchConfigurationTab {
if (cProject != null)
{
config.setMappedResources(new IResource[] { cProject.getProject() });
- ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(cProject.getProject());
- if (projDes != null)
- {
- String buildConfigID = projDes.getActiveConfiguration().getId();
- config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID);
- }
+ try { // Only initialize the build config ID once.
+ if (config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, "").length() == 0)//$NON-NLS-1$
+ {
+ ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(cProject.getProject());
+ if (projDes != null)
+ {
+ String buildConfigID = projDes.getActiveConfiguration().getId();
+ config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID);
+ }
+ }
+ } catch (CoreException e) { e.printStackTrace(); }
}
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText());
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, fProgText.getText());

Back to the top