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

[303735] Tool.getAllInputTypes() logic to override super tool's input types is buggy

This commit is contained in:
John Cortell 2010-02-25 17:06:32 +00:00
parent a1e035fa10
commit 414a66ba52

View file

@ -1207,6 +1207,9 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
// Our options take precedence.
Vector<InputType> ourTypes = getInputTypeList();
if (types != null) {
// Avoid replacing a replacement. See bug 303735
boolean[] typesWasReplaced = new boolean[types.length];
for (int i = 0; i < ourTypes.size(); i++) {
IInputType ourType = ourTypes.get(i);
int j;
@ -1216,8 +1219,10 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
otherTypeToCheck = types[j];
if (ourType.getSuperClass() != null &&
ourType.getSuperClass().getId().equals(otherTypeToCheck.getId())) {
ourType.getSuperClass().getId().equals(otherTypeToCheck.getId()) &&
!typesWasReplaced[j]) {
types[j] = ourType;
typesWasReplaced[j] = true;
break;
}
}