mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Open books from Github (#10670)
* Add open book option in UI * Add dropdowns option on dialog * Add flow logic * Fetch releases and validate URL * Add class for github books and shared file books * Change code structure * Unblock local copy + stack overflows * Download books from github * Remove unused files * Clean code and use the openNotebookFolder command to open remote book * Checkpoint * Refactor remote book dialog model to only hold data * Remove ApiWrapper and refactor createlocalcopy method * Use sinon js framework instead of typemoq for testing remotebookController * Remove api wrapper * Add some tests * Add more tests and address pr comments * Address PR comments * Fix remotebook broken tests * Add download location in output channel and use openBook command * Address PR comments * Fix typos, print error message and remove failing test * Print error message * Separate tests in different files * Declare controller variable inside extension.tst Co-authored-by: chlafreniere <hichise@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import * as vscode from 'vscode';
|
||||
import { NotebookUtils } from './notebookUtils';
|
||||
import { BookTreeViewProvider } from '../book/bookTreeView';
|
||||
import { NavigationProviders, BOOKS_VIEWID, PROVIDED_BOOKS_VIEWID } from './constants';
|
||||
import { NavigationProviders, BOOKS_VIEWID, PROVIDED_BOOKS_VIEWID, extensionOutputChannelName } from './constants';
|
||||
|
||||
/**
|
||||
* Global context for the application
|
||||
@@ -16,6 +16,7 @@ export class AppContext {
|
||||
public readonly notebookUtils: NotebookUtils;
|
||||
public readonly bookTreeViewProvider: BookTreeViewProvider;
|
||||
public readonly providedBookTreeViewProvider: BookTreeViewProvider;
|
||||
public readonly outputChannel: vscode.OutputChannel;
|
||||
|
||||
constructor(public readonly extensionContext: vscode.ExtensionContext) {
|
||||
this.notebookUtils = new NotebookUtils();
|
||||
@@ -23,5 +24,6 @@ export class AppContext {
|
||||
let workspaceFolders = vscode.workspace.workspaceFolders?.slice() ?? [];
|
||||
this.bookTreeViewProvider = new BookTreeViewProvider(workspaceFolders, extensionContext, false, BOOKS_VIEWID, NavigationProviders.NotebooksNavigator);
|
||||
this.providedBookTreeViewProvider = new BookTreeViewProvider([], extensionContext, true, PROVIDED_BOOKS_VIEWID, NavigationProviders.ProvidedBooksNavigator);
|
||||
this.outputChannel = vscode.window.createOutputChannel(extensionOutputChannelName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user