mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
TypeHierarchy: fixes a bug using working set filter.
This commit is contained in:
parent
246e84345a
commit
9ffa39148a
1 changed files with 4 additions and 12 deletions
|
@ -96,18 +96,10 @@ public class THNode implements IAdaptable {
|
|||
}
|
||||
|
||||
public void addChild(THNode childNode) {
|
||||
switch(fChildren.size()) {
|
||||
case 0:
|
||||
fChildren= Collections.singletonList(childNode);
|
||||
break;
|
||||
case 1:
|
||||
fChildren= new ArrayList(fChildren);
|
||||
fChildren.add(childNode);
|
||||
break;
|
||||
default:
|
||||
fChildren.add(childNode);
|
||||
break;
|
||||
}
|
||||
if (fChildren.isEmpty()) {
|
||||
fChildren= new ArrayList();
|
||||
}
|
||||
fChildren.add(childNode);
|
||||
}
|
||||
|
||||
public boolean hasChildren() {
|
||||
|
|
Loading…
Add table
Reference in a new issue