mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Feat/close book (#9453)
* initial commit * Add Reveal in Books editor tab context option * Select item in books viewlet automatically * changes * easier than i thought it'd be * added file watcher on toc file v1 * Merge from Feat/create book * Undo Merge from Feat/create book * Use fsPath instead of path * repen book on toc update * update book in-place * fix close book * error handling for closeBook * PR comments * addressed comments * moved the watch block to try ,watch vs watchFile Co-authored-by: chlafreniere <hichise@gmail.com> Co-authored-by: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,8 @@ export class BookModel implements azdata.nb.NavigationProvider {
|
||||
}
|
||||
|
||||
public async initializeContents(): Promise<void> {
|
||||
this._tableOfContentPaths = [];
|
||||
this._bookItems = [];
|
||||
await this.getTableOfContentFiles(this.bookPath);
|
||||
await this.readBooks();
|
||||
}
|
||||
@@ -157,8 +159,8 @@ export class BookModel implements azdata.nb.NavigationProvider {
|
||||
let uriToNotebook: vscode.Uri = vscode.Uri.file(pathToNotebook);
|
||||
if (!this._allNotebooks.get(uriToNotebook.fsPath)) {
|
||||
this._allNotebooks.set(uriToNotebook.fsPath, notebook);
|
||||
notebooks.push(notebook);
|
||||
}
|
||||
notebooks.push(notebook);
|
||||
}
|
||||
} else if (await fs.pathExists(pathToMarkdown)) {
|
||||
let markdown: BookTreeItem = new BookTreeItem({
|
||||
|
||||
Reference in New Issue
Block a user