mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
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:
@@ -370,12 +370,6 @@ export interface INotebookModel {
|
||||
*/
|
||||
deleteCell(cellModel: ICellModel): void;
|
||||
|
||||
/**
|
||||
* Save the model to its backing content manager.
|
||||
* Serializes the model and then calls through to save it
|
||||
*/
|
||||
saveModel(): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Serialize notebook cell content to JSON
|
||||
*/
|
||||
|
||||
@@ -766,20 +766,6 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
return name;
|
||||
}
|
||||
|
||||
public async saveModel(): Promise<boolean> {
|
||||
let notebook = this.toJSON();
|
||||
if (!notebook) {
|
||||
return false;
|
||||
}
|
||||
// TODO: refactor ContentManager out from NotebookManager
|
||||
await this.notebookManagers[0].contentManager.save(this._notebookOptions.notebookUri, notebook);
|
||||
this._contentChangedEmitter.fire({
|
||||
changeType: NotebookChangeType.DirtyStateChanged,
|
||||
isDirty: false
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
private async updateKernelInfo(kernel: nb.IKernel): Promise<void> {
|
||||
if (kernel) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user