mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
add NotebookDocument.save().
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user