idea-plugin / arrow.meta.ide.dsl.editor.structureView / StructureViewSyntax

StructureViewSyntax

interface StructureViewSyntax

Functions

addStructureView Room for improvement: the function parameters should also adapt to transformopen fun <A : PsiElement> IdeMetaPlugin.addStructureView(transform: (psiFile: PsiFile) -> A?, putInfo: (info: MutableMap<String, String>) -> Unit, childrenBase: (file: PsiFile) -> MutableCollection<StructureViewTreeElement> = { KotlinStructureViewElement(it).childrenBase.toMutableList() }, presentableText: (file: PsiFile) -> String? = { KotlinStructureViewElement(it).presentableText }, isAlwaysShowsPlus: (element: StructureViewTreeElement?) -> Boolean = { it?.value.run { (this is KtClassOrObject && this !is KtEnumEntry) || this is KtFile } }, isAlwaysLeaf: (element: StructureViewTreeElement?) -> Boolean = Noop.boolean1False): ExtensionPhase
addStructureViewForKtFile Convenient function to construct a StructureViewopen fun IdeMetaPlugin.addStructureViewForKtFile(putInfo: (info: MutableMap<String, String>) -> Unit, childrenBase: (file: KtFile) -> MutableCollection<StructureViewTreeElement> = { KotlinStructureViewElement(it).childrenBase.toMutableList() }, presentableText: (file: KtFile) -> String? = { KotlinStructureViewElement(it).presentableText }, isAlwaysShowsPlus: (element: StructureViewTreeElement?) -> Boolean = { it?.value.run { (this is KtClassOrObject && this !is KtEnumEntry) || this is KtFile } }, isAlwaysLeaf: (element: StructureViewTreeElement?) -> Boolean = Noop.boolean1False): ExtensionPhase
structureViewFactory Use LanguageStructureViewBuilderopen fun StructureViewSyntax.structureViewFactory(structureViewBuilder: (psiFile: PsiFile) -> StructureViewBuilder?): PsiStructureViewFactory
structureViewModel Closest impl to Kotlin’s StructureViewModel Default’s from KotlinStructureViewModel Can also be abstracted to PsiFile’sopen fun StructureViewSyntax.structureViewModel(psiFile: PsiFile, editor: Editor?, treeElementBase: (file: PsiFile) -> StructureViewTreeElement = { KotlinStructureViewElement(it, false) }, isAlwaysShowsPlus: (element: StructureViewTreeElement?) -> Boolean = { it?.value.run { (this is KtClassOrObject && this !is KtEnumEntry) || this is KtFile } }, isAlwaysLeaf: (element: StructureViewTreeElement?) -> Boolean = Noop.boolean1False, putInfo: (info: MutableMap<String, String>) -> Unit): StructureViewModel
treeBasedStructureViewBuilder Standard impl for StructureViewBuilderopen fun StructureViewSyntax.treeBasedStructureViewBuilder(structureViewModel: (editor: Editor?) -> StructureViewModel): StructureViewBuilder
treeElementBase open fun <F : PsiFile> StructureViewSyntax.treeElementBase(psiFile: F, childrenBase: (file: F) -> MutableCollection<StructureViewTreeElement> = { KotlinStructureViewElement(it).childrenBase.toMutableList() }, presentableText: (file: F) -> String? = { KotlinStructureViewElement(it).presentableText }, putInfo: (info: MutableMap<String, String>) -> Unit): StructureViewTreeElement

Inheritors

IdeSyntax interface IdeSyntax : IntentionSyntax, IconProviderSyntax, SyntaxHighlighterSyntax, InspectionSyntax, AnActionSyntax, ColorSettingsSyntax, HintingSyntax, LanguageSyntax, LineMarkerSyntax, LiveTemplateSyntax, NavigationSyntax, SearchSyntax, StructureViewSyntax, UsageSyntax, ExtensionProviderSyntax, DocumentationSyntax, KotlinExtensionSyntax, DialogSyntax, PopupSyntax, NotificationSyntax, ToolWindowSyntax, GotoRelatedSyntax, AnnotatorSyntax, ParserSyntax, ApplicationSyntax

Do you like Arrow?

Arrow Org
<