New feature: Jupyter Books (#6095)

* Initial commit

* Fixed broken branch

* Show notebook titles in tree view

* Added  README

* sections showing in tree view

* Multiple books in treeview

* removed book extension, added to notebook

* removed book from extensions.ts

* addressed Chris' comments

* Addressed Charles' comments

* fixed spelling in readme

* added comment about same filenames

* adding vsix

* addressed Karl's comments
This commit is contained in:
Lucy Zhang
2019-06-27 10:10:30 -07:00
committed by GitHub
parent f39647f243
commit 98c6af628b
7 changed files with 164 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ import { IExtensionApi } from './types';
import { CellType } from './contracts/content';
import { getErrorMessage, isEditorTitleFree } from './common/utils';
import { NotebookUriHandler } from './protocol/notebookUriHandler';
import { BookTreeViewProvider } from './book/bookTreeView';
const localize = nls.loadMessageBundle();
@@ -26,6 +27,11 @@ let controller: JupyterController;
type ChooseCellType = { label: string, id: CellType };
export async function activate(extensionContext: vscode.ExtensionContext): Promise<IExtensionApi> {
const bookTreeViewProvider = new BookTreeViewProvider(vscode.workspace.rootPath || '');
vscode.window.registerTreeDataProvider('bookTreeView', bookTreeViewProvider);
vscode.commands.registerCommand('bookTreeView.openNotebook', (resource) => bookTreeViewProvider.openNotebook(resource));
extensionContext.subscriptions.push(vscode.commands.registerCommand('_notebook.command.new', (context?: azdata.ConnectedContext) => {
let connectionProfile: azdata.IConnectionProfile = undefined;
if (context && context.connectionProfile) {