idea-plugin / arrow.meta.ide.dsl.editor.lineMarker / LineMarkerSyntax

LineMarkerSyntax

interface LineMarkerSyntax

LineMarker’s serve as visuals, which appear on specified PsiElements. There are several methods to subscribe LineMarkers, the one LineMarkerSyntax provides is derived from Kotlin’s org.jetbrains.kotlin.idea.highlighter.KotlinSuspendCallLineMarkerProvider and org.jetbrains.kotlin.idea.highlighter.KotlinRecursiveCallLineMarkerProvider. In general, subscription techniques differ mainly in performance.

Functions

addLineMarkerProvider open fun <A : PsiElement> IdeMetaPlugin.addLineMarkerProvider(transform: (PsiElement) -> A?, lineMarkerInfo: (a: A) -> LineMarkerInfo<PsiElement>?, slowLineMarker: (a: A) -> LineMarkerInfo<PsiElement>? = Noop.nullable1()): ExtensionPhase
Due tu performance reason’s it is advised that A is a leaf element (e.g: Psi(Identifier)) and not composite PsiElements such as KtClass. The identifying PsiElement of the latter is the class name. The PsiViewer Plugin may help to verify that A is a leaf element, by observing the tree structure of the PsiElement. Nonetheless, IntelliJ will automatically send warnings during the runIde gradle task, if an implementation doesn’t comply with this premise.open fun <A : PsiElement> IdeMetaPlugin.addLineMarkerProvider(icon: Icon, transform: (PsiElement) -> A?, message: (element: A) -> String = Noop.string1(), placed: Alignment = GutterIconRenderer.Alignment.RIGHT, navigate: (event: MouseEvent, element: PsiElement) -> Unit = Noop.effect2, clickAction: AnAction? = null): ExtensionPhase
addLineMarkerProvider is a convenience extension, which registers the Leaf element of a composite PsiElement A e.g.: KtClass and circumvents effort’s to find the right PsiElement. In addition, plugin developer’s can compose sophisticated messages, as the whole scope of A can be exploited.open fun <A : PsiNameIdentifierOwner> IdeMetaPlugin.addLineMarkerProvider(icon: Icon, transform: (PsiElement) -> A?, composite: Class<A>, message: DescriptorRenderer.Companion.(A) -> String = Noop.string2(), placed: Alignment = GutterIconRenderer.Alignment.RIGHT, navigate: (event: MouseEvent, element: PsiElement) -> Unit = Noop.effect2, clickAction: AnAction? = null): ExtensionPhase
addLineMarkerProviderM Similar to addLineMarkerProvider, but with mergeable LineMarkers, based on the predicate mergeWith.open fun <A : PsiElement> IdeMetaPlugin.addLineMarkerProviderM(icon: Icon, transform: (PsiElement) -> A?, message: (element: A) -> String = Noop.string1(), commonIcon: MergeableLineMarkerInfo<PsiElement>.(others: List<MergeableLineMarkerInfo<PsiElement>>) -> Icon = { icon }, mergeWith: MergeableLineMarkerInfo<PsiElement>.(other: MergeableLineMarkerInfo<*>) -> Boolean = { this.icon == it.icon }, placed: Alignment = GutterIconRenderer.Alignment.RIGHT, navigate: (event: MouseEvent, element: PsiElement) -> Unit = Noop.effect2, clickAction: AnAction? = null): ExtensionPhase
open fun <A : PsiNameIdentifierOwner> IdeMetaPlugin.addLineMarkerProviderM(icon: Icon, transform: (PsiElement) -> A?, composite: Class<A>, message: DescriptorRenderer.Companion.(A) -> String = Noop.string2(), commonIcon: MergeableLineMarkerInfo<PsiElement>.(others: List<MergeableLineMarkerInfo<PsiElement>>) -> Icon = { icon }, mergeWith: MergeableLineMarkerInfo<PsiElement>.(other: MergeableLineMarkerInfo<*>) -> Boolean = { this.icon == it.icon }, navigate: (event: MouseEvent, element: PsiElement) -> Unit = Noop.effect2, placed: Alignment = GutterIconRenderer.Alignment.RIGHT, clickAction: AnAction? = null): ExtensionPhase
addRelatedLineMarkerProvider open fun <A : PsiElement> IdeMetaPlugin.addRelatedLineMarkerProvider(icon: Icon, transform: (PsiElement) -> A?, targets: (A) -> List<GotoRelatedItem>, message: (A) -> String = Noop.string1(), pass: Int = Pass.LINE_MARKERS, placed: Alignment = GutterIconRenderer.Alignment.RIGHT, navigate: (event: MouseEvent, element: PsiElement) -> Unit = Noop.effect2, clickAction: AnAction? = null): ExtensionPhase
open fun <A : PsiNameIdentifierOwner> IdeMetaPlugin.addRelatedLineMarkerProvider(icon: Icon, transform: (PsiElement) -> A?, composite: Class<A>, targets: (A) -> List<GotoRelatedItem>, message: DescriptorRenderer.Companion.(A) -> String = Noop.string2(), pass: Int = Pass.LINE_MARKERS, placed: Alignment = GutterIconRenderer.Alignment.RIGHT, navigate: (event: MouseEvent, element: PsiElement) -> Unit = Noop.effect2, clickAction: AnAction? = null): ExtensionPhase
lineMarkerInfo open fun LineMarkerSyntax.lineMarkerInfo(icon: Icon, element: PsiElement, message: (PsiElement) -> String, placed: Alignment = GutterIconRenderer.Alignment.LEFT, navigate: (event: MouseEvent, element: PsiElement) -> Unit = Noop.effect2, clickAction: AnAction? = null): LineMarkerInfo<PsiElement>
mergeableLineMarkerInfo MergeableLineMarkerInfo can merge multiple LineMarkerInfo’s into one, if mergeWith is true.open fun LineMarkerSyntax.mergeableLineMarkerInfo(icon: Icon, element: PsiElement, message: (PsiElement) -> String, commonIcon: MergeableLineMarkerInfo<PsiElement>.(others: List<MergeableLineMarkerInfo<PsiElement>>) -> Icon = { icon }, mergeWith: MergeableLineMarkerInfo<PsiElement>.(other: MergeableLineMarkerInfo<*>) -> Boolean = { this.icon == it.icon }, placed: Alignment = GutterIconRenderer.Alignment.LEFT, navigate: (event: MouseEvent, element: PsiElement) -> Unit = Noop.effect2, clickAction: AnAction? = null): MergeableLineMarkerInfo<PsiElement>
navigationGutter open fun <R> LineMarkerSyntax.navigationGutter(icon: Icon, element: PsiElement, config: NavigationGutterIconBuilder<PsiElement>.(element: PsiElement) -> R): R
onComposite provides a function f from a Leaf PsiElementopen fun <A : PsiNameIdentifierOwner, L : LineMarkerInfo<PsiElement>> PsiElement.onComposite(composite: Class<A>, f: (A) -> L): L?
registerLineMarker open fun IdeMetaPlugin.registerLineMarker(provider: LineMarkerProvider): ExtensionPhase
relatedLineMarkerInfo open fun LineMarkerSyntax.relatedLineMarkerInfo(icon: Icon, element: PsiElement, message: (PsiElement) -> String, targets: List<GotoRelatedItem>, pass: Int = Pass.LINE_MARKERS, placed: Alignment = GutterIconRenderer.Alignment.LEFT, navigate: (event: MouseEvent, element: PsiElement) -> Unit = Noop.effect2, clickAction: AnAction? = null): RelatedItemLineMarkerInfo<PsiElement>
relatedLineMarkerProvider open fun <A : PsiElement> IdeMetaPlugin.relatedLineMarkerProvider(transform: (PsiElement) -> A?, lineMarkerInfo: (a: A) -> RelatedItemLineMarkerInfo<PsiElement>?): ExtensionPhase

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
<