1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

debug main tab: move build initialization out of updateProjectFromConfig

- initialization of some parts were in weird places, which won't allow
properly overload it. Move build config initialization into
updateBuildOptionFromConfig from updateProjectFromConfig

Change-Id: I7eebe24da963b14de4eec48df27817a9820977fd
This commit is contained in:
Alena Laskavaia 2016-01-18 12:14:48 -05:00 committed by Gerrit Code Review @ Eclipse.org
parent 6d5d0be628
commit 6d3ca105fc

View file

@ -402,8 +402,18 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
} catch (CoreException e) {
LaunchUIPlugin.log(e);
}
if (configAuto)
if (configAuto) {
updateBuildConfigCombo(AUTO_CONFIG);
} else {
String configName = EMPTY_STRING;
try {
configName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID,
configName);
} catch (CoreException ce) {
LaunchUIPlugin.log(ce);
}
updateBuildConfigCombo(configName);
}
updateComboTooltip();
if (fDisableBuildButton != null)
fDisableBuildButton
@ -578,16 +588,13 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
protected void updateProjectFromConfig(ILaunchConfiguration config) {
String projectName = EMPTY_STRING;
String configName = EMPTY_STRING;
try {
projectName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
configName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, EMPTY_STRING);
} catch (CoreException ce) {
LaunchUIPlugin.log(ce);
}
if (!fProjText.getText().equals(projectName))
fProjText.setText(projectName);
updateBuildConfigCombo(configName);
}
protected void updateProgramFromConfig(ILaunchConfiguration config) {