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

@@ -20,6 +20,7 @@ import { VIEWLET_ID as EXPLORER } from 'vs/workbench/contrib/files/common/files'
import { VIEWLET_ID as SCM } from 'vs/workbench/contrib/scm/common/scm';
import { VIEWLET_ID as DEBUG } from 'vs/workbench/contrib/debug/common/debug';
import { VIEWLET_ID as REMOTE } from 'vs/workbench/contrib/remote/common/remote.contribution';
import { VIEWLET_ID as NOTEBOOK } from 'sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet'; // {{SQL CARBON EDIT}}
import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { URI } from 'vs/base/common/uri';
import { ViewletRegistry, Extensions as ViewletExtensions, ShowViewletAction } from 'vs/workbench/browser/viewlet';
@@ -164,6 +165,13 @@ const viewsContribution: IJSONSchema = {
type: 'array',
items: remoteViewDescriptor,
default: []
},
// {{SQL CARBON EDIT}}
'notebooks': {
description: localize('views.notebooks', "Contributes views to Notebooks container in the Activity bar."),
type: 'array',
items: viewDescriptor,
default: []
}
},
additionalProperties: {
@@ -479,6 +487,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
case 'debug': return this.viewContainersRegistry.get(DEBUG);
case 'scm': return this.viewContainersRegistry.get(SCM);
case 'remote': return this.viewContainersRegistry.get(REMOTE);
case 'notebooks': return this.viewContainersRegistry.get(NOTEBOOK); // {{SQL CARBON EDIT}}
default: return this.viewContainersRegistry.get(`workbench.view.extension.${value}`);
}
}