@Override
    public TreeElement[] getChildren() {
        List<PsiElement> children = new ArrayList<>();
        if (myElement instanceof SdFile) {
            children = SdUtil.findSchemaChildren(myElement);
        } else if (myElement instanceof SdDocumentDefinition) {
            children = SdUtil.findDocumentChildren(myElement);
        } else if (myElement instanceof SdDocumentStructDefinition) {
            children = SdUtil.findDocumentStructChildren(myElement);
        } else if (myElement instanceof SdRankProfileDefinition) {
            children = SdUtil.findRankProfileChildren(myElement);
        } else if (myElement instanceof SdDocumentSummaryDefinition) {
            children = SdUtil.findDocumentSummaryChildren(myElement);
        } else if (myElement instanceof SdSchemaAnnotationDefinition ||
                   myElement instanceof SdDocumentAnnotationDefinition) {
            children = SdUtil.findAnnotationChildren(myElement);
        }
        
        List<TreeElement> treeElements = new ArrayList<>(children.size());
        for (PsiElement child : children) {
            treeElements.add(new SdStructureViewElement((NavigatablePsiElement) child));
        }
        return treeElements.toArray(new TreeElement[0]);
    }
This class is used for the presentation of an element in the "Structure View" window.

@author Shahar Ariel
integration/intellij/src/main/java/ai/vespa/intellij/schema/structure/SdStructureViewElement.java