Skip to content

Commit

Permalink
Follow up #133 (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbcarlos authored Mar 31, 2023
1 parent 612c443 commit eb8456d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/collaboration-extension/src/filebrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ namespace CommandIDs {
}

/**
* The default file browser factory provider.
* The default collaborative drive provider.
*/
export const drive: JupyterFrontEndPlugin<ICollaborativeDrive> = {
id: '@jupyter/collaboration-extension:drive',
description: 'The default collaborative drive provider',
provides: ICollaborativeDrive,
requires: [ITranslator],
optional: [],
Expand All @@ -49,10 +50,12 @@ export const drive: JupyterFrontEndPlugin<ICollaborativeDrive> = {
};

/**
* The default file browser factory provider.
* Plugin to register the shared model factory for the content type 'file'.
*/
export const yfile: JupyterFrontEndPlugin<void> = {
id: '@jupyter/collaboration-extension:yfile',
description:
"Plugin to register the shared model factory for the content type 'file'",
autoStart: true,
requires: [ICollaborativeDrive],
optional: [],
Expand All @@ -65,10 +68,12 @@ export const yfile: JupyterFrontEndPlugin<void> = {
};

/**
* The default file browser factory provider.
* Plugin to register the shared model factory for the content type 'notebook'.
*/
export const ynotebook: JupyterFrontEndPlugin<void> = {
id: '@jupyter/collaboration-extension:ynotebook',
description:
"Plugin to register the shared model factory for the content type 'notebook'",
autoStart: true,
requires: [ICollaborativeDrive],
optional: [ISettingRegistry],
Expand Down Expand Up @@ -116,6 +121,7 @@ export const ynotebook: JupyterFrontEndPlugin<void> = {
*/
export const defaultFileBrowser: JupyterFrontEndPlugin<IDefaultFileBrowser> = {
id: '@jupyter/collaboration-extension:defaultFileBrowser',
description: 'The default file browser factory provider',
provides: IDefaultFileBrowser,
requires: [ICollaborativeDrive, IFileBrowserFactory],
optional: [
Expand Down
3 changes: 3 additions & 0 deletions packages/docprovider/src/ydrive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ class SharedModelFactory implements ISharedModelFactory {
type: Contents.ContentType,
factory: SharedDocumentFactory
) {
if (this._documentFactories.has(type)) {
throw new Error(`The content type ${type} already exists`);
}
this._documentFactories.set(type, factory);
}

Expand Down

0 comments on commit eb8456d

Please sign in to comment.