mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
[303735] Tool.getAllInputTypes() logic to override super tool's input types is buggy
This commit is contained in:
parent
a1e035fa10
commit
414a66ba52
1 changed files with 6 additions and 1 deletions
|
@ -1207,6 +1207,9 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
||||||
// Our options take precedence.
|
// Our options take precedence.
|
||||||
Vector<InputType> ourTypes = getInputTypeList();
|
Vector<InputType> ourTypes = getInputTypeList();
|
||||||
if (types != null) {
|
if (types != null) {
|
||||||
|
// Avoid replacing a replacement. See bug 303735
|
||||||
|
boolean[] typesWasReplaced = new boolean[types.length];
|
||||||
|
|
||||||
for (int i = 0; i < ourTypes.size(); i++) {
|
for (int i = 0; i < ourTypes.size(); i++) {
|
||||||
IInputType ourType = ourTypes.get(i);
|
IInputType ourType = ourTypes.get(i);
|
||||||
int j;
|
int j;
|
||||||
|
@ -1216,8 +1219,10 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
||||||
otherTypeToCheck = types[j];
|
otherTypeToCheck = types[j];
|
||||||
|
|
||||||
if (ourType.getSuperClass() != null &&
|
if (ourType.getSuperClass() != null &&
|
||||||
ourType.getSuperClass().getId().equals(otherTypeToCheck.getId())) {
|
ourType.getSuperClass().getId().equals(otherTypeToCheck.getId()) &&
|
||||||
|
!typesWasReplaced[j]) {
|
||||||
types[j] = ourType;
|
types[j] = ourType;
|
||||||
|
typesWasReplaced[j] = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue