Construct a new application.
The options for creating the application.
Private
_bubblingPrivate
_delegatePrivate
_startedReadonly
commandsThe application command registry.
Readonly
contextThe application context menu.
Protected
pluginApplication plugin registry.
Readonly
shellThe application shell widget.
The shell widget is the root "container" widget for the entire application. It will typically expose an API which allows the application plugins to insert content in a variety of places.
The list of all the deferred plugins.
Protected
addAdd the application event listeners.
The default implementation of this method adds listeners for
'keydown'
and 'resize'
events.
A subclass may reimplement this method as needed.
Protected
attachAttach the application shell to the DOM.
The ID of the host node for the shell, or ''
.
If the ID is not provided, the document body will be the host.
A subclass may reimplement this method as needed.
Deactivate the plugin and its downstream dependents if and only if the
plugin and its dependents all support deactivate
.
The ID of the plugin of interest.
A list of IDs of downstream plugins deactivated with this one.
Protected
evtA method invoked on a document 'contextmenu'
event.
The default implementation of this method opens the application
contextMenu
at the current mouse position.
If the application context menu has no matching content or if the shift key is pressed, the default browser context menu will be opened instead.
A subclass may reimplement this method as needed.
Protected
evtA method invoked on a document 'keydown'
event.
The default implementation of this method invokes the key down processing method of the application command registry.
A subclass may reimplement this method as needed.
Protected
evtA method invoked on a document 'keyup'
event.
The default implementation of this method invokes the key up processing method of the application command registry.
A subclass may reimplement this method as needed.
Protected
evtRegister a plugin with the application.
The plugin to register.
An error will be thrown if a plugin with the same ID is already registered, or if the plugin has a circular dependency.
If the plugin provides a service which has already been provided by another plugin, the new service will override the old service.
Register multiple plugins with the application.
Resolve an optional service of a given type.
A promise which resolves to an instance of the requested
service, or null
if it cannot be resolved.
Services are singletons. The same instance will be returned each time a given service token is resolved.
If the plugin which provides the service has not been activated, resolving the service will automatically activate the plugin.
User code will not typically call this method directly. Instead, the optional services for the user's plugins will be resolved automatically when the plugin is activated.
Resolve a required service of a given type.
A promise which resolves to an instance of the requested service, or rejects with an error if it cannot be resolved.
Services are singletons. The same instance will be returned each time a given service token is resolved.
If the plugin which provides the service has not been activated, resolving the service will automatically activate the plugin.
User code will not typically call this method directly. Instead, the required services for the user's plugins will be resolved automatically when the plugin is activated.
Start the application.
The options for starting the application.
A promise which resolves when all bootstrapping work is complete and the shell is mounted to the DOM.
This should be called once by the application creator after all initial plugins have been registered.
If a plugin fails to the load, the error will be logged and the other valid plugins will continue to be loaded.
Bootstrapping the application consists of the following steps:
A class for creating pluggable applications.