mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix bug introduced after 3.0 regarding resource configuration options
This commit is contained in:
parent
f27c90b8b4
commit
4fb623c366
1 changed files with 16 additions and 14 deletions
|
@ -229,22 +229,24 @@ public class HoldsOptions extends BuildObject implements IHoldsOptions {
|
|||
Vector ourOpts = getOptionList();
|
||||
if (options != null) {
|
||||
for (int i = 0; i < ourOpts.size(); i++) {
|
||||
int j = options.length;
|
||||
IOption ourOpt = (IOption)ourOpts.get(i);
|
||||
int j;
|
||||
for (j = 0; j < options.length; j++) {
|
||||
if (((Option)options[j]).wasOptRef()) {
|
||||
if (ourOpt.getSuperClass() != null // Remove assumption that ALL options must have superclasses
|
||||
&& ourOpt.getSuperClass().getId().equals(options[j].getSuperClass().getId())) {
|
||||
options[j] = ourOpt;
|
||||
break;
|
||||
if (ourOpt.getSuperClass() != null) {
|
||||
String matchId = ourOpt.getSuperClass().getId();
|
||||
search:
|
||||
for (j = 0; j < options.length; j++) {
|
||||
IOption superHolderOption = options[j];
|
||||
if (((Option)superHolderOption).wasOptRef()) {
|
||||
superHolderOption = superHolderOption.getSuperClass();
|
||||
}
|
||||
while (superHolderOption != null) {
|
||||
if (matchId.equals(superHolderOption.getId())) {
|
||||
options[j] = ourOpt;
|
||||
break search;
|
||||
}
|
||||
superHolderOption = superHolderOption.getSuperClass();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (ourOpt.getSuperClass() != null // Remove assumption that ALL options must have superclasses
|
||||
&& ourOpt.getSuperClass().getId().equals(options[j].getId())) {
|
||||
options[j] = ourOpt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// No Match? Add it.
|
||||
if (j == options.length) {
|
||||
|
|
Loading…
Add table
Reference in a new issue