mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Checked in the patch from Bob Monteleone that fixes the problem with updating a CDT 1.2 project to CDT 3.0 where a property of type enumeration has changed
This commit is contained in:
parent
b2aff9b7c5
commit
09ed69dcb6
1 changed files with 6 additions and 0 deletions
|
@ -385,6 +385,12 @@ class UpdateManagedProject12 {
|
||||||
String name = optRef.getAttribute(IOption.DEFAULT_VALUE);
|
String name = optRef.getAttribute(IOption.DEFAULT_VALUE);
|
||||||
// Convert it to the ID
|
// Convert it to the ID
|
||||||
String idValue = newOpt.getEnumeratedId(name);
|
String idValue = newOpt.getEnumeratedId(name);
|
||||||
|
if (idValue == null) {
|
||||||
|
// If the name does not match one of the enumerations values, probably because
|
||||||
|
// the list of enumerands has changed, set the name to be the name used for the
|
||||||
|
// enumeration's default value
|
||||||
|
name = (String)newOpt.getDefaultValue();
|
||||||
|
}
|
||||||
configuration.setOption(tool, newOpt, idValue != null ? idValue : name);
|
configuration.setOption(tool, newOpt, idValue != null ? idValue : name);
|
||||||
break;
|
break;
|
||||||
case IOption.STRING_LIST:
|
case IOption.STRING_LIST:
|
||||||
|
|
Loading…
Add table
Reference in a new issue