mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
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:
@@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace schema {
|
||||
case 'notebook/toolbar': return MenuId.NotebookToolbar;
|
||||
case 'dataExplorer/context': return MenuId.DataExplorerContext;
|
||||
case 'dataExplorer/action': return MenuId.DataExplorerAction;
|
||||
case 'notebooks/title': return MenuId.NotebookTitle;
|
||||
case 'comments/commentThread/title': return MenuId.CommentThreadTitle;
|
||||
case 'comments/commentThread/context': return MenuId.CommentThreadActions;
|
||||
case 'comments/comment/title': return MenuId.CommentTitle;
|
||||
|
||||
@@ -596,6 +596,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
case 'remote':
|
||||
viewletId = 'workbench.view.remote';
|
||||
break;
|
||||
// {{SQL CARBON EDIT}} add notebook view container to views
|
||||
case 'notebooks':
|
||||
viewletId = 'workbench.view.notebooks';
|
||||
break;
|
||||
default:
|
||||
viewletId = `workbench.view.extension.${container.id}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user