mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 14:15:23 +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) {
|
public void addChild(THNode childNode) {
|
||||||
switch(fChildren.size()) {
|
if (fChildren.isEmpty()) {
|
||||||
case 0:
|
fChildren= new ArrayList();
|
||||||
fChildren= Collections.singletonList(childNode);
|
}
|
||||||
break;
|
fChildren.add(childNode);
|
||||||
case 1:
|
|
||||||
fChildren= new ArrayList(fChildren);
|
|
||||||
fChildren.add(childNode);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
fChildren.add(childNode);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasChildren() {
|
public boolean hasChildren() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue