|
@@ -507,7 +507,7 @@ function activateNotebookHandler(
|
|
restorer: ILayoutRestorer | null,
|
|
restorer: ILayoutRestorer | null,
|
|
mainMenu: IMainMenu | null,
|
|
mainMenu: IMainMenu | null,
|
|
settingRegistry: ISettingRegistry | null,
|
|
settingRegistry: ISettingRegistry | null,
|
|
- sessionDialogs: ISessionContextDialogs
|
|
|
|
|
|
+ sessionDialogs: ISessionContextDialogs | null
|
|
): INotebookTracker {
|
|
): INotebookTracker {
|
|
const services = app.serviceManager;
|
|
const services = app.serviceManager;
|
|
|
|
|
|
@@ -1147,7 +1147,7 @@ function addCommands(
|
|
const current = getCurrent(args);
|
|
const current = getCurrent(args);
|
|
|
|
|
|
if (current) {
|
|
if (current) {
|
|
- return sessionDialogs.restart(current.sessionContext);
|
|
|
|
|
|
+ return sessionDialogs!.restart(current.sessionContext);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
isEnabled
|
|
isEnabled
|
|
@@ -1233,7 +1233,7 @@ function addCommands(
|
|
if (current) {
|
|
if (current) {
|
|
const { content, sessionContext } = current;
|
|
const { content, sessionContext } = current;
|
|
|
|
|
|
- return sessionDialogs.restart(sessionContext).then(() => {
|
|
|
|
|
|
+ return sessionDialogs!.restart(sessionContext).then(() => {
|
|
NotebookActions.clearAllOutputs(content);
|
|
NotebookActions.clearAllOutputs(content);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -1248,7 +1248,7 @@ function addCommands(
|
|
if (current) {
|
|
if (current) {
|
|
const { context, content, sessionContext } = current;
|
|
const { context, content, sessionContext } = current;
|
|
|
|
|
|
- return sessionDialogs.restart(sessionContext).then(restarted => {
|
|
|
|
|
|
+ return sessionDialogs!.restart(sessionContext).then(restarted => {
|
|
if (restarted) {
|
|
if (restarted) {
|
|
void NotebookActions.runAll(content, context.sessionContext);
|
|
void NotebookActions.runAll(content, context.sessionContext);
|
|
}
|
|
}
|
|
@@ -1611,7 +1611,7 @@ function addCommands(
|
|
const current = getCurrent(args);
|
|
const current = getCurrent(args);
|
|
|
|
|
|
if (current) {
|
|
if (current) {
|
|
- return sessionDialogs.selectKernel(current.context.sessionContext);
|
|
|
|
|
|
+ return sessionDialogs!.selectKernel(current.context.sessionContext);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
isEnabled
|
|
isEnabled
|
|
@@ -2092,9 +2092,9 @@ function populateMenus(
|
|
return Promise.resolve(void 0);
|
|
return Promise.resolve(void 0);
|
|
},
|
|
},
|
|
noun: 'All Outputs',
|
|
noun: 'All Outputs',
|
|
- restartKernel: current => sessionDialogs.restart(current.sessionContext),
|
|
|
|
|
|
+ restartKernel: current => sessionDialogs!.restart(current.sessionContext),
|
|
restartKernelAndClear: current => {
|
|
restartKernelAndClear: current => {
|
|
- return sessionDialogs.restart(current.sessionContext).then(restarted => {
|
|
|
|
|
|
+ return sessionDialogs!.restart(current.sessionContext).then(restarted => {
|
|
if (restarted) {
|
|
if (restarted) {
|
|
NotebookActions.clearAllOutputs(current.content);
|
|
NotebookActions.clearAllOutputs(current.content);
|
|
}
|
|
}
|
|
@@ -2102,7 +2102,7 @@ function populateMenus(
|
|
});
|
|
});
|
|
},
|
|
},
|
|
changeKernel: current =>
|
|
changeKernel: current =>
|
|
- sessionDialogs.selectKernel(current.sessionContext),
|
|
|
|
|
|
+ sessionDialogs!.selectKernel(current.sessionContext),
|
|
shutdownKernel: current => current.sessionContext.shutdown()
|
|
shutdownKernel: current => current.sessionContext.shutdown()
|
|
} as IKernelMenu.IKernelUser<NotebookPanel>);
|
|
} as IKernelMenu.IKernelUser<NotebookPanel>);
|
|
|
|
|
|
@@ -2169,7 +2169,7 @@ function populateMenus(
|
|
},
|
|
},
|
|
restartAndRunAll: current => {
|
|
restartAndRunAll: current => {
|
|
const { context, content } = current;
|
|
const { context, content } = current;
|
|
- return sessionDialogs.restart(context.sessionContext).then(restarted => {
|
|
|
|
|
|
+ return sessionDialogs!.restart(context.sessionContext).then(restarted => {
|
|
if (restarted) {
|
|
if (restarted) {
|
|
void NotebookActions.runAll(content, context.sessionContext);
|
|
void NotebookActions.runAll(content, context.sessionContext);
|
|
}
|
|
}
|