// Path: src/main/java/claims/bold/intellij/avro/idl/psi/AvroIdlFile.java
// public class AvroIdlFile extends PsiFileBase {
//     public AvroIdlFile(@NotNull FileViewProvider viewProvider) {
//         super(viewProvider, AvroIdlLanguage.INSTANCE);
//     }
// 
//     @NotNull
//     @Override
//     public FileType getFileType() {
//         return AvroIdlFileType.INSTANCE;
//     }
// 
//     @Override
//     public String toString() {
//         return "Avro™ IDL file";
//     }
// }


import claims.bold.intellij.avro.idl.psi.AvroIdlFile;
import com.intellij.ide.structureView.StructureViewBuilder;
import com.intellij.ide.structureView.StructureViewModel;
import com.intellij.ide.structureView.TreeBasedStructureViewBuilder;
import com.intellij.lang.PsiStructureViewFactory;
import com.intellij.openapi.editor.Editor;
import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
package claims.bold.intellij.avro.idl.structure;


public class AvroIdlStructureViewFactory implements PsiStructureViewFactory {
    @Nullable
    @Override
    public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
        return new TreeBasedStructureViewBuilder() {
            @NotNull
            @Override
            public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
// Path: src/main/java/claims/bold/intellij/avro/idl/psi/AvroIdlFile.java
// public class AvroIdlFile extends PsiFileBase {
//     public AvroIdlFile(@NotNull FileViewProvider viewProvider) {
//         super(viewProvider, AvroIdlLanguage.INSTANCE);
//     }
// 
//     @NotNull
//     @Override
//     public FileType getFileType() {
//         return AvroIdlFileType.INSTANCE;
//     }
// 
//     @Override
//     public String toString() {
//         return "Avro™ IDL file";
//     }
// }


// Path: src/main/java/claims/bold/intellij/avro/idl/structure/AvroIdlStructureViewFactory.java
import claims.bold.intellij.avro.idl.psi.AvroIdlFile;
import com.intellij.ide.structureView.StructureViewBuilder;
import com.intellij.ide.structureView.StructureViewModel;
import com.intellij.ide.structureView.TreeBasedStructureViewBuilder;
import com.intellij.lang.PsiStructureViewFactory;
import com.intellij.openapi.editor.Editor;
import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

package claims.bold.intellij.avro.idl.structure;


public class AvroIdlStructureViewFactory implements PsiStructureViewFactory {
    @Nullable
    @Override
    public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
        return new TreeBasedStructureViewBuilder() {
            @NotNull
            @Override
            public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
                return new AvroIdlStructureViewModel((AvroIdlFile)psiFile, editor);