PluginManagement
Extends:
Provides methods to manage minimap plugins. Minimap plugins are Atom packages that will augment the minimap. They have a secondary activation cycle going on constrained by the minimap package activation. A minimap plugin life cycle will generally look like this:
- The plugin module is activated by Atom through the
activatemethod - The plugin then register itself as a minimap plugin using
registerPlugin - The plugin is activated/deactivated according to the minimap settings.
- On the plugin module deactivation, the plugin must unregisters itself
from the minimap using the
unregisterPlugin.
Method Summary
| Public Methods | ||
| public |
Deactivates all the plugins registered in the minimap package so far. |
|
| public |
* eachPlugin(): * A generator function to iterate over registered plugins. |
|
| public |
Returns the Minimap main module instance. |
|
| public |
registerPlugin(name: string, plugin: MinimapPlugin) Registers a minimap |
|
| public |
togglePluginActivation(name: string, boolean: boolean) Toggles the specified plugin activation state. |
|
| public |
unregisterPlugin(name: string) Unregisters a plugin from the minimap. |
|
Public Methods
public deactivateAllPlugins() source
Deactivates all the plugins registered in the minimap package so far.
Emit:
did-deactivate-plugin |
for each plugin deactivated by the call. |
public * eachPlugin(): * source
A generator function to iterate over registered plugins.
Return:
| * | An iterable that yield the name and reference to every plugin as an array in each iteration. |
public registerPlugin(name: string, plugin: MinimapPlugin) source
Registers a minimap plugin with the given name.
Params:
| Name | Type | Attribute | Description |
| name | string | The identifying name of the plugin. It will be used as activation settings name as well as the key to unregister the module. |
|
| plugin | MinimapPlugin | The plugin to register. |
Emit:
did-add-plugin |
with the name and a reference to the added plugin. |
did-activate-plugin |
if the plugin was activated during the registration. |