mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add abillity to open to specific item within a Jupyter book (#7155)
* Add abillity to open to specific item within a Jupyter book * Move helper method into BookTreeItem class * Fix default URL path * Add typing to Jupyter book code * Update comment and typings * Fix compile error and cleanup
This commit is contained in:
@@ -124,8 +124,8 @@ class AzdataExtensionBookContributionProvider extends Disposable implements Book
|
||||
this.contributions.map(book => {
|
||||
let bookName: string = path.basename(book.path);
|
||||
vscode.commands.executeCommand('setContext', bookName, true);
|
||||
vscode.commands.registerCommand('books.' + bookName, async (context) => {
|
||||
vscode.commands.executeCommand('bookTreeView.openBook', book.path, true);
|
||||
vscode.commands.registerCommand('books.' + bookName, async (urlToOpen?: string) => {
|
||||
vscode.commands.executeCommand('bookTreeView.openBook', book.path, true, urlToOpen);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user