Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2007-12-31 16:26:49 -0500
committerKen Ryall2007-12-31 16:26:49 -0500
commit0c647ac1d5b60ca852e6f96fdf771f0849fbf55f (patch)
tree81acb02039ad2af919075b4878d45d4baf164d40
parent3e7980894dba802965b23804a4f5f215d60c4467 (diff)
downloadorg.eclipse.cdt-0c647ac1d5b60ca852e6f96fdf771f0849fbf55f.tar.gz
org.eclipse.cdt-0c647ac1d5b60ca852e6f96fdf771f0849fbf55f.tar.xz
org.eclipse.cdt-0c647ac1d5b60ca852e6f96fdf771f0849fbf55f.zip
Only initialize the build config ID when the launch config is first created.
-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 80cbc57483..8b34a794d5 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