idea-plugin / arrow.meta.ide.dsl.editor.action / AnActionSyntax

AnActionSyntax

interface AnActionSyntax : AnActionUtilitySyntax

AnActionExtensionProvider is in charge of the lifecycle of AnAction. AnAction can be placed, executed and composed into any workflow, throughout the whole application lifecycle. Whether on-demand by the user or as a standalone workflow. They’re able to access almost every part of the ide. In other words, AnAction contains a computation which can be evaluated multiple times at any time. When a user triggers AnAction the AnAction.actionPerformed function is executed. AnAction may have starkly different purposes, from changing CompilerConfigurations in the editor to opening UI element’s with media content. Here are a few Links to the Action System from IntelliJ’s Development Guide:

Functions

addAnAction Registers the action with actionId as its identifier. The actionId is solely used internally.open fun IdeMetaPlugin.addAnAction(actionId: String, action: AnAction): ExtensionPhase
addTimerListener registers a TimerListeneropen fun IdeMetaPlugin.addTimerListener(delay: Int, modalityState: ModalityState, run: () -> Unit): ExtensionPhase
addTransparentTimerListener registers a transparent TimerListeneropen fun IdeMetaPlugin.addTransparentTimerListener(delay: Int, modalityState: ModalityState, run: () -> Unit): ExtensionPhase
anAction open fun AnActionSyntax.anAction(actionPerformed: (e: AnActionEvent) -> Unit, beforeActionPerformedUpdate: (e: AnActionEvent) -> Unit = Noop.effect1, update: (e: AnActionEvent) -> Unit = Noop.effect1, displayTextInToolbar: Boolean = false, setInjectedContext: (worksInInjected: Boolean) -> Boolean = { it }, useSmallerFontForTextInToolbar: Boolean = false, startInTransaction: Boolean = false, getTemplateText: String? = null): AnAction
open fun AnActionSyntax.anAction(icon: Icon, actionPerformed: (e: AnActionEvent) -> Unit, beforeActionPerformedUpdate: (e: AnActionEvent) -> Unit = Noop.effect1, update: (e: AnActionEvent) -> Unit = Noop.effect1, displayTextInToolbar: Boolean = false, setInjectedContext: (worksInInjected: Boolean) -> Boolean = { it }, useSmallerFontForTextInToolbar: Boolean = false, startInTransaction: Boolean = false, getTemplateText: String? = null): AnAction
open fun AnActionSyntax.anAction(title: String, actionPerformed: (e: AnActionEvent) -> Unit, beforeActionPerformedUpdate: (e: AnActionEvent) -> Unit = Noop.effect1, update: (e: AnActionEvent) -> Unit = Noop.effect1, displayTextInToolbar: Boolean = false, setInjectedContext: (worksInInjected: Boolean) -> Boolean = { it }, useSmallerFontForTextInToolbar: Boolean = false, startInTransaction: Boolean = false, getTemplateText: String? = null): AnAction
open fun AnActionSyntax.anAction(title: String, description: String, icon: Icon, actionPerformed: (e: AnActionEvent) -> Unit, beforeActionPerformedUpdate: (e: AnActionEvent) -> Unit = Noop.effect1, update: (e: AnActionEvent) -> Unit = Noop.effect1, displayTextInToolbar: Boolean = false, setInjectedContext: (worksInInjected: Boolean) -> Boolean = { it }, useSmallerFontForTextInToolbar: Boolean = false, startInTransaction: Boolean = false, getTemplateText: String? = null): AnAction
removeTimerListener removes a TimerListeneropen fun IdeMetaPlugin.removeTimerListener(listener: TimerListener): ExtensionPhase
removeTransparentTimerListener removes a transparent TimerListeneropen fun IdeMetaPlugin.removeTransparentTimerListener(listener: TimerListener): ExtensionPhase
replaceAnAction replaces AnAction with actionId to a newActionopen fun IdeMetaPlugin.replaceAnAction(actionId: String, newAction: AnAction): ExtensionPhase
timerListener open fun AnActionSyntax.timerListener(modalityState: ModalityState, run: () -> Unit): TimerListener
unregisterAnAction unregisters AnActionopen fun IdeMetaPlugin.unregisterAnAction(actionId: String): ExtensionPhase

Inheritors

IdeSyntax interface IdeSyntax : IntentionSyntax, IconProviderSyntax, SyntaxHighlighterSyntax, InspectionSyntax, AnActionSyntax, ColorSettingsSyntax, HintingSyntax, LanguageSyntax, LineMarkerSyntax, LiveTemplateSyntax, NavigationSyntax, SearchSyntax, StructureViewSyntax, UsageSyntax, ExtensionProviderSyntax, DocumentationSyntax, KotlinIndicesSyntax, DialogSyntax, PopupSyntax, NotificationSyntax

Do you like Arrow?

Arrow Org
<