// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STGroupTokenTypes.java
// public static RuleIElementType getRuleElementType(@MagicConstant(valuesFromClass = STGParser.class) int ruleIndex) {
//     return RULE_ELEMENT_TYPES.get(ruleIndex);
// }


import com.intellij.extapi.psi.ASTWrapperPsiElement;
import com.intellij.ide.util.treeView.smartTree.TreeElement;
import com.intellij.navigation.ItemPresentation;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import org.antlr.jetbrains.st4plugin.parsing.STGParser;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import static org.antlr.jetbrains.st4plugin.psi.STGroupTokenTypes.getRuleElementType;
package org.antlr.jetbrains.st4plugin.structview;




public class STGroupRootTreeElement extends STGroupStructureViewTreeElement {

    public STGroupRootTreeElement(PsiFile psiFile) {
        super(psiFile);
    }

    @NotNull
    @Override
    public ItemPresentation getPresentation() {
        return new STGroupRootItemPresentation((PsiFile) psiElement);
    }

    @NotNull
    @Override
    public TreeElement[] getChildren() {
        return Arrays.stream(this.psiElement.getChildren())
// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STGroupTokenTypes.java
// public static RuleIElementType getRuleElementType(@MagicConstant(valuesFromClass = STGParser.class) int ruleIndex) {
//     return RULE_ELEMENT_TYPES.get(ruleIndex);
// }


// Path: src/main/java/org/antlr/jetbrains/st4plugin/structview/STGroupRootTreeElement.java
import com.intellij.extapi.psi.ASTWrapperPsiElement;
import com.intellij.ide.util.treeView.smartTree.TreeElement;
import com.intellij.navigation.ItemPresentation;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import org.antlr.jetbrains.st4plugin.parsing.STGParser;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import static org.antlr.jetbrains.st4plugin.psi.STGroupTokenTypes.getRuleElementType;

package org.antlr.jetbrains.st4plugin.structview;




public class STGroupRootTreeElement extends STGroupStructureViewTreeElement {

    public STGroupRootTreeElement(PsiFile psiFile) {
        super(psiFile);
    }

    @NotNull
    @Override
    public ItemPresentation getPresentation() {
        return new STGroupRootItemPresentation((PsiFile) psiElement);
    }

    @NotNull
    @Override
    public TreeElement[] getChildren() {
        return Arrays.stream(this.psiElement.getChildren())
                .filter(e -> e.getNode().getElementType() == getRuleElementType(STGParser.RULE_group))