TemplateActionLoader

open class TemplateActionLoader(val getTemplates: () -> List<Template> = { Settings.DEFAULT.templates }) : DynamicActionConfigurationCustomizer(source)

Registers, replaces, and unregisters actions for the user's Templates so that they can be inserted using shortcuts.

Parameters

getTemplates

shorthand to return all the user's stored Templates

Inheritors

Constructors

Link copied to clipboard
constructor(getTemplates: () -> List<Template> = { Settings.DEFAULT.templates })

Properties

Link copied to clipboard
private val getTemplates: () -> List<Template>

Functions

Link copied to clipboard
private fun getActions(template: Template): Map<String, AnAction>

Returns all variant actions belonging to template.

Link copied to clipboard
private fun registerAction(actionManager: ActionManager, template: Template)

Registers the actions associated with template using actionManager.

Link copied to clipboard
open override fun registerActions(actionManager: ActionManager)

Registers the actions for all Templates in the user's Settings using actionManager.

Link copied to clipboard
private fun unregisterAction(actionManager: ActionManager, template: Template)

Unregisters the actions associated with template using actionManager.

Link copied to clipboard
open override fun unregisterActions(actionManager: ActionManager)

Unregisters the actions of all Templates in the user's Settings using actionManager.

Link copied to clipboard
fun updateActions(oldList: List<Template>, newList: List<Template>, actionManager: ActionManager = ActionManager.getInstance())

Registers, unregisters, and updates actions as appropriate for a transition from oldList to newList using actionManager.