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:
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.
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue