1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Fix for bug 64762 -- ClassCastException while deleting of build configuration

This commit is contained in:
Sean Evoy 2004-06-07 18:52:51 +00:00
parent 35fa250ece
commit cbd4446ff5

View file

@ -501,12 +501,13 @@ public class ManageConfigDialog extends Dialog {
// If this is a newly added config, remove it from that map
if (getNewConfigs().containsKey(selectedConfigName)) {
selectedConfigId = (String) getNewConfigs().get(selectedConfigName);
IConfiguration selectedConfig = (IConfiguration) getNewConfigs().get(selectedConfigName);
selectedConfigId = selectedConfig.getId();
getNewConfigs().remove(selectedConfigName);
} else {
// If it is not a new item, the ID is in the existing list
selectedConfigId = (String) getExistingConfigs().get(selectedConfigName);
}
// If it is not a new item, the ID is in the existing list
selectedConfigId = (String) getExistingConfigs().get(selectedConfigName);
getDeletedConfigs().put(selectedConfigName, selectedConfigId);
// Clean up the UI lists
@ -532,7 +533,8 @@ public class ManageConfigDialog extends Dialog {
// If this was a new config (it won't be in the existing list) then add it back there
if (!getExistingConfigs().containsKey(selectedConfigName)) {
getNewConfigs().put(selectedConfigName, selectedConfigId);
IConfiguration restoredConfig = managedTarget.getConfiguration(selectedConfigId);
getNewConfigs().put(selectedConfigName, restoredConfig);
}
// Remove it from the deleted map