Construct a new document registry.
Private
_changedPrivate
_defaultPrivate
_defaultPrivate
_defaultPrivate
_defaultPrivate
_extendersPrivate
_filePrivate
_isPrivate
_modelPrivate
_widgetPrivate
_widgetProtected
translatorA signal emitted when the registry has changed.
Get whether the document registry has been disposed.
Add a file type to the document registry.
The file type object to register.
Optional
factories: string[]Optional factories to use for the file type.
A disposable which will unregister the command.
These are used to populate the "Create New" dialog.
If no default factory exists for the file type, the first factory will be defined as default factory.
Add a model factory to the registry.
The factory instance.
A disposable which will unregister the factory.
If a factory with the given name
is already registered, or
the given factory is already registered, a warning will be logged
and this will be a no-op.
Add a widget extension to the registry.
The name of the widget factory.
A widget extension.
A disposable which will unregister the extension.
If the extension is already registered for the given widget name, a warning will be logged and this will be a no-op.
Add a widget factory to the registry.
The factory instance to register.
A disposable which will unregister the factory.
If a factory with the given 'name'
is already registered,
a warning will be logged, and this will be a no-op.
If '*'
is given as a default extension, the factory will be registered
as the global default.
If an extension or global default is already registered, this factory
will override the existing default.
The factory cannot be named an empty string or the string 'default'
.
Get the default rendered widget factory for a path.
The path to for which to find a widget factory.
The default rendered widget factory for the path.
If the widget factory has registered a separate set of defaultRendered
file types and there is a match in that set, this returns that.
Otherwise, this returns the same widget factory as
[[defaultWidgetFactory]].
The user setting defaultViewers
took precedence on this one too.
Get the default widget factory for a path.
Optional
path: stringAn optional file path to filter the results.
The default widget factory for an path.
This is equivalent to the first value in [[preferredWidgetFactories]].
Create an iterator over the file types that have been registered.
A new iterator of file types.
Get a file type by name.
Get the best file type given a contents model.
The best matching file type.
Get the file types that match a file name.
The path of the file.
An ordered list of matching file types.
Get a kernel preference.
A kernel preference.
Get a model factory by name.
The name of the model factory.
A model factory instance.
Get a widget factory by name.
The name of the widget factory.
A widget factory instance.
Create an iterator over the model factories that have been registered.
A new iterator of model factories.
Get a list of the preferred widget factories.
The file path to filter the results.
A new array of widget factories.
Only the widget factories whose associated model factory have been registered will be returned. The first item is considered the default. The returned array has widget factories in the following order:
Set overrides for the default widget factory for a file type.
Normally, a widget factory informs the document registry which file types
it should be the default for using the defaultFor
option in the
IWidgetFactoryOptions. This function can be used to override that after
the fact.
The name of the file type.
The name of the factory.
If factory
is undefined, then any override will be unset, and the
default factory will revert to the original value.
If factory
or fileType
are not known to the docregistry, or
if factory
cannot open files of type fileType
, this will throw
an error.
Create an iterator over the registered extensions for a given widget.
The name of the widget factory.
A new iterator over the widget extensions.
Create an iterator over the widget factories that have been registered.
A new iterator of widget factories.
The document registry.