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: (element: K, editor: Editor?) -> Unit = Noop.effect2, priority: Priority = PriorityAction.Priority.LOW): ExtensionPhase
kotlinIntention The function kotlinIntention is mainly used for QuickFixContributor. The default values are derived from KotlinIntentionActionsFactory.open fun IntentionSyntax.kotlinIntention(createAction: (diagnostic: Diagnostic) -> IntentionAction? = Noop.nullable1(), isApplicableForCodeFragment: Boolean = false, doCreateActionsForAllProblems: (sameTypeDiagnostics: Collection<Diagnostic>) -> List<IntentionAction> = Noop.emptyList1()): KotlinSingleIntentionActionFactory
ktIntention ktIntention constructs SelfTargetingIntention.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: (element: K, editor: Editor?) -> Unit = Noop.effect2, priority: Priority = PriorityAction.Priority.LOW): SelfTargetingIntention<K>
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, KotlinIndicesSyntax, DialogSyntax, PopupSyntax, NotificationSyntax

Do you like Arrow?

Arrow Org
<