use of com.intellij.ide.structureView.StructureViewFactoryEx in project intellij-community by JetBrains.
the class PsiTreeElementBase method getChildren.
@NotNull
@Override
public final StructureViewTreeElement[] getChildren() {
final T element = getElement();
if (element == null)
return EMPTY_ARRAY;
List<StructureViewTreeElement> result = new ArrayList<>();
Collection<StructureViewTreeElement> baseChildren = getChildrenBase();
result.addAll(CustomRegionStructureUtil.groupByCustomRegions(element, baseChildren));
StructureViewFactoryEx structureViewFactory = StructureViewFactoryEx.getInstanceEx(element.getProject());
Class<? extends PsiElement> aClass = element.getClass();
for (StructureViewExtension extension : structureViewFactory.getAllExtensions(aClass)) {
StructureViewTreeElement[] children = extension.getChildren(element);
if (children != null) {
ContainerUtil.addAll(result, children);
}
}
return result.toArray(new StructureViewTreeElement[result.size()]);
}
Aggregations