Adding back save api (#4407)

* #4339: Kernel change event occurs after model load

* #4347: Code cleanup - Notebooks Save

* Remove save method from sqlops

* Adding save method to api's

* Adding save method to ext host

* Misc change
This commit is contained in:
Raj
2019-03-12 13:07:10 -07:00
committed by GitHub
parent 2db83b3892
commit 6a7df2f1ae
10 changed files with 5 additions and 161 deletions

View File

@@ -53,26 +53,6 @@ export class AddCellAction extends Action {
}
}
export class SaveNotebookAction extends Action {
private static readonly notebookSavedMsg = localize('notebookSavedMsg', 'Notebook saved successfully.');
private static readonly notebookFailedSaveMsg = localize('notebookFailedSaveMsg', 'Failed to save Notebook.');
constructor(
id: string, label: string, cssClass: string,
@INotificationService private _notificationService: INotificationService
) {
super(id, label, cssClass);
}
public async run(context: NotebookComponent): TPromise<boolean> {
const actions: INotificationActions = { primary: [] };
let saved = await context.save();
if (saved) {
this._notificationService.notify({ severity: Severity.Info, message: SaveNotebookAction.notebookSavedMsg, actions });
}
return saved;
}
}
export interface IToggleableState {
baseClass?: string;
shouldToggleTooltip?: boolean;