mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Test/highlight correct nb (#11348)
* unit test of the method * stash changes * revealActiveDocumentInViewlet test * separate tests * test on activate * added tests * feedback changes * naming change
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { NotebookUtils } from './notebookUtils';
|
||||
import { BookTreeViewProvider } from '../book/bookTreeView';
|
||||
import { NavigationProviders, BOOKS_VIEWID, PROVIDED_BOOKS_VIEWID } from './constants';
|
||||
|
||||
/**
|
||||
* Global context for the application
|
||||
@@ -12,8 +14,14 @@ import { NotebookUtils } from './notebookUtils';
|
||||
export class AppContext {
|
||||
|
||||
public readonly notebookUtils: NotebookUtils;
|
||||
public readonly bookTreeViewProvider: BookTreeViewProvider;
|
||||
public readonly providedBookTreeViewProvider: BookTreeViewProvider;
|
||||
|
||||
constructor(public readonly extensionContext: vscode.ExtensionContext) {
|
||||
this.notebookUtils = new NotebookUtils();
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ export const sparkScalaDisplayName = 'Spark | Scala';
|
||||
export const sparkRDisplayName = 'Spark | R';
|
||||
export const powershellDisplayName = 'PowerShell';
|
||||
export const allKernelsName = 'All Kernels';
|
||||
export const BOOKS_VIEWID = 'bookTreeView';
|
||||
export const PROVIDED_BOOKS_VIEWID = 'providedBooksView';
|
||||
|
||||
export const visitedNotebooksMementoKey = 'notebooks.visited';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user