mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 01:25:36 -05:00
Books/viewlet refactor (#7208)
* add saved/untitled views to the books viewlet and provide save option to untitled * addressed comments * fixes after merge * await on async methods * reverted back * await on promise * added localize for books view names * initial commit * missed a file change * changes to make the merges work part1 * fixes after merges 2 * getChildren to get all books * chnages to address comments * fsPromises instead of fs.readSync * merged master * replaced deprecated fs.exists async call with pathExists * renamed method
This commit is contained in:
@@ -708,8 +708,8 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
||||
let result = await this._proxy.$getNavigation(handle, uri);
|
||||
if (result) {
|
||||
if (result.next.scheme === Schemas.untitled) {
|
||||
let untitledNbName: URI = URI.parse(`untitled:${path.basename(result.next.path)}`);
|
||||
let content = await this._fileService.readFile(URI.parse(result.next.path));
|
||||
let untitledNbName: URI = URI.parse(`untitled:${result.next.path}`);
|
||||
let content = await this._fileService.readFile(URI.file(result.next.path));
|
||||
await this.doOpenEditor(untitledNbName, { initialContent: content.value.toString(), initialDirtyState: false });
|
||||
}
|
||||
else {
|
||||
@@ -721,8 +721,8 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
||||
let result = await this._proxy.$getNavigation(handle, uri);
|
||||
if (result) {
|
||||
if (result.previous.scheme === Schemas.untitled) {
|
||||
let untitledNbName: URI = URI.parse(`untitled:${path.basename(result.previous.path)}`);
|
||||
let content = await this._fileService.readFile(URI.parse(result.previous.path));
|
||||
let untitledNbName: URI = URI.parse(`untitled:${result.previous.path}`);
|
||||
let content = await this._fileService.readFile(URI.file(result.previous.path));
|
||||
await this.doOpenEditor(untitledNbName, { initialContent: content.value.toString(), initialDirtyState: false });
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user