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