Feat/notebooks viewlet (#10170)

* clean up unsavedBooks to providedBooks

* added notebooks viewley contribution

* added notebookExporerAction context

* temp shortcut key B

* remove commenred code

* changes with master merge

* fix comments

* initial tests

* fix casing and description

* merged master and resolved errors

* remove extension point & add custom view container

* merge latest from master

* remove unused files

* move book images to common

* remove notebookExplorer contrib & move to notebook

* build fix

* remove explorer specific sryles from common

* vscode convention to define container actions

* rename notebooks/title
This commit is contained in:
Maddy
2020-06-01 15:47:56 -07:00
committed by GitHub
parent 7305bdaec4
commit 3088c73e2b
18 changed files with 349 additions and 43 deletions

View File

@@ -46,6 +46,9 @@ import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } fr
import { NotebookThemingContribution } from 'sql/workbench/contrib/notebook/browser/notebookThemingContribution';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode';
import { NotebookExplorerViewletViewsContribution, OpenNotebookExplorerViewletAction } from 'sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet';
import 'vs/css!./media/notebook.contribution';
Registry.as<IEditorInputFactoryRegistry>(EditorInputFactoryExtensions.EditorInputFactories)
.registerEditorInputFactory(FileNotebookInput.ID, FileNoteBookEditorInputFactory);
@@ -348,3 +351,16 @@ registerComponentType({
selector: MimeRendererComponent.SELECTOR
});
registerCellComponent(TextCellComponent);
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
workbenchRegistry.registerWorkbenchContribution(NotebookExplorerViewletViewsContribution, LifecyclePhase.Starting);
const registry = Registry.as<IWorkbenchActionRegistry>(WorkbenchActionsExtensions.WorkbenchActions);
registry.registerWorkbenchAction(
SyncActionDescriptor.create(
OpenNotebookExplorerViewletAction,
OpenNotebookExplorerViewletAction.ID,
OpenNotebookExplorerViewletAction.LABEL,
{ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_B }),
'View: Show Notebook Explorer',
localize('notebookExplorer.view', "View")
);