mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Check the grand Children also
This commit is contained in:
parent
c7097698e8
commit
a323aa42f0
1 changed files with 6 additions and 0 deletions
|
@ -53,6 +53,12 @@ public class Variable extends CObject implements ICDIVariable {
|
|||
Variable variable = (Variable)children[i];
|
||||
if (name.equals(variable.getMIVar().getVarName())) {
|
||||
return variable;
|
||||
} else {
|
||||
// Look also in the grandchildren.
|
||||
Variable grandChild = variable.getChild(name);
|
||||
if (grandChild != null) {
|
||||
return grandChild;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Add table
Reference in a new issue