add NotebookDocument.save().

This commit is contained in:
rebornix
2021-02-18 11:50:25 -08:00
parent df04e1388d
commit 9c77f4d86a
6 changed files with 64 additions and 2 deletions

View File

@@ -669,6 +669,15 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
return uri;
}
async $trySaveDocument(uriComponents: UriComponents) {
const uri = URI.revive(uriComponents);
const ref = await this._notebookModelResolverService.resolve(uri);
const saveResult = await ref.object.save();
ref.dispose();
return saveResult;
}
async $tryShowNotebookDocument(resource: UriComponents, viewType: string, options: INotebookDocumentShowOptions): Promise<string> {
const editorOptions: ITextEditorOptions = {
preserveFocus: options.preserveFocus,