|
@@ -135,7 +135,15 @@ const docManagerPlugin: JupyterFrontEndPlugin<IDocumentManager> = {
|
|
});
|
|
});
|
|
|
|
|
|
// Register the file operations commands.
|
|
// Register the file operations commands.
|
|
- addCommands(app, docManager, settingRegistry, labShell, palette, mainMenu);
|
|
|
|
|
|
+ addCommands(
|
|
|
|
+ app,
|
|
|
|
+ docManager,
|
|
|
|
+ opener,
|
|
|
|
+ settingRegistry,
|
|
|
|
+ labShell,
|
|
|
|
+ palette,
|
|
|
|
+ mainMenu
|
|
|
|
+ );
|
|
|
|
|
|
// Keep up to date with the settings registry.
|
|
// Keep up to date with the settings registry.
|
|
const onSettingsUpdated = (settings: ISettingRegistry.ISettings) => {
|
|
const onSettingsUpdated = (settings: ISettingRegistry.ISettings) => {
|
|
@@ -266,6 +274,7 @@ function fileType(widget: Widget, docManager: IDocumentManager): string {
|
|
function addCommands(
|
|
function addCommands(
|
|
app: JupyterFrontEnd,
|
|
app: JupyterFrontEnd,
|
|
docManager: IDocumentManager,
|
|
docManager: IDocumentManager,
|
|
|
|
+ opener: DocumentManager.IWidgetOpener,
|
|
settingRegistry: ISettingRegistry,
|
|
settingRegistry: ISettingRegistry,
|
|
labShell: ILabShell | null,
|
|
labShell: ILabShell | null,
|
|
palette: ICommandPalette | null,
|
|
palette: ICommandPalette | null,
|
|
@@ -293,7 +302,7 @@ function addCommands(
|
|
|
|
|
|
// If inside a rich application like JupyterLab, add additional functionality.
|
|
// If inside a rich application like JupyterLab, add additional functionality.
|
|
if (labShell) {
|
|
if (labShell) {
|
|
- addLabCommands(app, docManager, labShell, palette);
|
|
|
|
|
|
+ addLabCommands(app, docManager, labShell, opener, palette);
|
|
}
|
|
}
|
|
|
|
|
|
commands.addCommand(CommandIDs.close, {
|
|
commands.addCommand(CommandIDs.close, {
|
|
@@ -603,6 +612,7 @@ function addLabCommands(
|
|
app: JupyterFrontEnd,
|
|
app: JupyterFrontEnd,
|
|
docManager: IDocumentManager,
|
|
docManager: IDocumentManager,
|
|
labShell: ILabShell,
|
|
labShell: ILabShell,
|
|
|
|
+ opener: DocumentManager.IWidgetOpener,
|
|
palette: ICommandPalette | null
|
|
palette: ICommandPalette | null
|
|
): void {
|
|
): void {
|
|
const { commands } = app;
|
|
const { commands } = app;
|