idea-plugin / arrow.meta.ide.dsl.editor.intention / IntentionSyntax

IntentionSyntax

interface IntentionSyntax : IntentionUtilitySyntax

The IDE analysis user code and provides IntentionAction’s to either signal error’s to user’s or resolve them if triggered.

Functions

addIntention registers intentionopen fun IdeMetaPlugin.addIntention(intention: IntentionAction): ExtensionPhase
This extension registers an SelfTargetingIntention. The following example renames a helloWorld function to renamed, whenever the user decides to trigger that Intention.open fun <K : KtElement> IdeMetaPlugin.addIntention(text: String = "", kClass: Class<K> = KtElement::class.java as Class<K>, isApplicableTo: (element: K, caretOffset: Int) -> Boolean = Noop.boolean2False, applyTo: KtPsiFactory.(element: K, editor: Editor) -> Unit = Noop.effect3, priority: Priority = PriorityAction.Priority.LOW): ExtensionPhase
ktIntention ktIntention constructs SelfTargetingIntention. SelfTargetingIntentions can be used with Annotator.open fun <K : KtElement> IntentionSyntax.ktIntention(text: String = "", kClass: Class<K> = KtElement::class.java as Class<K>, isApplicableTo: (element: K, caretOffset: Int) -> Boolean = Noop.boolean2False, applyTo: KtPsiFactory.(element: K, editor: Editor) -> Unit = Noop.effect3, priority: Priority = PriorityAction.Priority.LOW): SelfTargetingIntention<K>
The default values are derived from KotlinIntentionActionsFactory.open fun IntentionSyntax.ktIntention(action: (diagnostic: Diagnostic) -> IntentionAction? = Noop.nullable1(), isApplicableForCodeFragment: Boolean = false, actionsForAll: (diagnostics: List<Diagnostic>) -> List<IntentionAction> = Noop.emptyList1()): KotlinSingleIntentionActionFactory
setIntentionAsEnabled Intentions can be enabled and disabled before at application start.open fun IdeMetaPlugin.setIntentionAsEnabled(intention: IntentionAction, enabled: Boolean): ExtensionPhase
This function is similar to setIntentionAsEnabled for IntentionActionMetaDataopen fun IdeMetaPlugin.setIntentionAsEnabled(intention: IntentionActionMetaData, enabled: Boolean): ExtensionPhase
unregisterIntention unregisters intention from the editoropen fun IdeMetaPlugin.unregisterIntention(intention: IntentionAction): 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
<