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,20 +229,22 @@ 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) {
String matchId = ourOpt.getSuperClass().getId();
search:
for (j = 0; j < options.length; j++) { for (j = 0; j < options.length; j++) {
if (((Option)options[j]).wasOptRef()) { IOption superHolderOption = options[j];
if (ourOpt.getSuperClass() != null // Remove assumption that ALL options must have superclasses if (((Option)superHolderOption).wasOptRef()) {
&& ourOpt.getSuperClass().getId().equals(options[j].getSuperClass().getId())) { superHolderOption = superHolderOption.getSuperClass();
options[j] = ourOpt;
break;
} }
} else { while (superHolderOption != null) {
if (ourOpt.getSuperClass() != null // Remove assumption that ALL options must have superclasses if (matchId.equals(superHolderOption.getId())) {
&& ourOpt.getSuperClass().getId().equals(options[j].getId())) {
options[j] = ourOpt; options[j] = ourOpt;
break; break search;
}
superHolderOption = superHolderOption.getSuperClass();
} }
} }
} }