Class: PluginManager
Manages a collection of plugins, allowing registration, activation, and deactivation.
Constructors
Constructor
new PluginManager():
PluginManager
Returns
PluginManager
Accessors
documentView
Get Signature
get documentView():
DocumentView
Gets the current document view.
Returns
Set Signature
set documentView(
v):void
Sets a new document view and updates all registered plugins with the new view. Deactivates each plugin before assigning the new view.
Parameters
v
Returns
void
Methods
activatePlugin()
activatePlugin(
plugin):void
Activates a given plugin and deactivates all other plugins.
Parameters
plugin
The plugin to activate.
Returns
void
activatePluginById()
activatePluginById(
pluginId):void
Activates a plugin by its ID and deactivates all other plugins.
Parameters
pluginId
string
The ID of the plugin to activate.
Returns
void
Throws
If the plugin with the given ID does not exist.
deregisterPlugin()
deregisterPlugin(
plugin):void
Deregisters a plugin and deactivates it.
Parameters
plugin
The plugin to deregister.
Returns
void
deregisterPluginById()
deregisterPluginById(
pluginId):void
Deregisters a plugin by its ID.
Parameters
pluginId
string
The ID of the plugin to deregister.
Returns
void
Throws
If the plugin with the given ID does not exist.
getPluginById()
getPluginById(
id):Plugin
Retrieves a plugin by its ID.
Parameters
id
string
The ID of the plugin to retrieve.
Returns
The plugin with the given ID, or undefined if not found.
registerPlugin()
registerPlugin(
plugin):void
Registers a new plugin.
Parameters
plugin
The plugin to register.
Returns
void
Throws
If a plugin with the same ID is already registered.