Nb/open book without reload (#6635)

* initial commit

* fix: added initialize method to fix the previous/next links rendering

* added checks

* open first markdown/ipynb in the book ans expand the view

* added launch book from command pallete, removed the pick folder and save option added launching the first notebook/markdown

* moved the open book command pallet action from mssql to notebooks

* open as untitled to true

* opening markdown files issue fix

* removed opening as untitled files

* open ipynb files as untitled and changes for previous&next links to work

* add books as seperate viewlet

* localize double quote issues and renamed treeCollapsibleState

* renames and added logic to conditionally show Preview command

* moved registerCommands from widget to extension contribution

* isEditorUntitled check

* async comment updates

* formatting issues.

* promisfying the async calls

* moved existsAsync to top
This commit is contained in:
Maddy
2019-08-23 11:19:35 -07:00
committed by GitHub
parent 1a39fdae24
commit 9274f223f0
9 changed files with 576 additions and 464 deletions

View File

@@ -30,6 +30,8 @@ export async function activate(extensionContext: vscode.ExtensionContext): Promi
const bookTreeViewProvider = new BookTreeViewProvider(vscode.workspace.workspaceFolders || [], extensionContext);
extensionContext.subscriptions.push(vscode.window.registerTreeDataProvider('bookTreeView', bookTreeViewProvider));
extensionContext.subscriptions.push(azdata.nb.registerNavigationProvider(bookTreeViewProvider));
extensionContext.subscriptions.push(vscode.commands.registerCommand('bookTreeView.openBook', (resource, openAsReadonly) => bookTreeViewProvider.openBook(resource, extensionContext, openAsReadonly)));
extensionContext.subscriptions.push(vscode.commands.registerCommand('bookTreeView.openNotebookAsUntitled', (resource) => bookTreeViewProvider.openNotebookAsUntitled(resource)));
extensionContext.subscriptions.push(vscode.commands.registerCommand('bookTreeView.openNotebook', (resource) => bookTreeViewProvider.openNotebook(resource)));
extensionContext.subscriptions.push(vscode.commands.registerCommand('bookTreeView.openMarkdown', (resource) => bookTreeViewProvider.openMarkdown(resource)));
extensionContext.subscriptions.push(vscode.commands.registerCommand('bookTreeView.openExternalLink', (resource) => bookTreeViewProvider.openExternalLink(resource)));