StructureViewBuilder (@NotNull PsiFile psiFile) { if (!(psiFile instanceof KtFile file)) { return null; } return new TreeBasedStructureViewBuilder() { @Override public @NotNull StructureViewModel createStructureViewModel(@Nullable Editor editor) { return new KotlinStructureViewModel(file, editor, new KotlinFirStructureViewElement(file, file, false)) { @Override public @NotNull Collection<NodeProvider<?>> getNodeProviders() { return NODE_PROVIDERS; } }; } @Override public boolean isRootNodeShown() { return !KotlinIconProvider.Companion.isSingleClassFile(file); } }; }