1
0
Fork 0
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:
Leo Treggiari 2005-09-12 02:54:51 +00:00
parent f27c90b8b4
commit 4fb623c366

View file

@ -229,22 +229,24 @@ public class HoldsOptions extends BuildObject implements IHoldsOptions {
Vector ourOpts = getOptionList(); Vector ourOpts = getOptionList();
if (options != null) { if (options != null) {
for (int i = 0; i < ourOpts.size(); i++) { for (int i = 0; i < ourOpts.size(); i++) {
int j = options.length;
IOption ourOpt = (IOption)ourOpts.get(i); IOption ourOpt = (IOption)ourOpts.get(i);
int j; if (ourOpt.getSuperClass() != null) {
for (j = 0; j < options.length; j++) { String matchId = ourOpt.getSuperClass().getId();
if (((Option)options[j]).wasOptRef()) { search:
if (ourOpt.getSuperClass() != null // Remove assumption that ALL options must have superclasses for (j = 0; j < options.length; j++) {
&& ourOpt.getSuperClass().getId().equals(options[j].getSuperClass().getId())) { IOption superHolderOption = options[j];
options[j] = ourOpt; if (((Option)superHolderOption).wasOptRef()) {
break; 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. // No Match? Add it.
if (j == options.length) { if (j == options.length) {