InsertAction

abstract class InsertAction(val repeat: Boolean = false, val text: String, description: String? = null, icon: Icon? = null) : AnAction(source)

Inserts strings in the editor.

If configurable is not null when actionPerformed is invoked, a modal editor is shown to edit that configurable right before inserting the strings to allow for last-minute adjustments to how the strings are generated.

Parameters

description

the optional description of the action

icon

the icon that represents the action

Inheritors

Constructors

Link copied to clipboard
constructor(repeat: Boolean = false, text: String, description: String? = null, icon: Icon? = null)

Properties

Link copied to clipboard
protected open val configurable: Configurable? = null

The configurable to open as soon as the action is performed but before the strings are inserted.

Link copied to clipboard
val repeat: Boolean = false

true if and only if the same value should be inserted at each caret.

Link copied to clipboard
val text: String

The text that identifies the action to the user.

Functions

Link copied to clipboard
open override fun actionPerformed(event: AnActionEvent)

Inserts the data generated by the scheme at the caret(s) in the editor; one datum for each caret.

Link copied to clipboard
abstract fun generateStrings(count: Int): List<String>

Generates count strings.

Link copied to clipboard
open override fun getActionUpdateThread(): ActionUpdateThread

Specifies the thread in which update is invoked.

Link copied to clipboard
open override fun update(event: AnActionEvent)

Sets the title of this action and disables this action if no editor is currently opened.