Add back open view keybindings (#15264)

This commit is contained in:
Charles Gagnon
2021-04-28 12:17:36 -07:00
committed by GitHub
parent 9bc1797e88
commit be8a55cef0
2 changed files with 14 additions and 8 deletions

View File

@@ -40,6 +40,7 @@ import { URI } from 'vs/base/common/uri';
import { TreeViewPane } from 'vs/workbench/browser/parts/views/treeView';
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
export const VIEWLET_ID = 'workbench.view.notebooks';
@@ -435,6 +436,11 @@ export const NOTEBOOK_VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(View
id: VIEWLET_ID,
title: localize('notebookExplorer.name', "Notebooks"),
ctorDescriptor: new SyncDescriptor(NotebookExplorerViewPaneContainer),
openCommandActionDescriptor: {
id: VIEWLET_ID,
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_B },
order: 0
},
icon: { id: notebookIconId },
order: 6,
storageId: `${VIEWLET_ID}.state`

View File

@@ -149,13 +149,6 @@ export class ExplorerViewletViewsContribution extends Disposable implements IWor
ctorDescriptor: new SyncDescriptor(ExplorerView),
order: 1,
canToggleVisibility: false,
openCommandActionDescriptor: {
id: VIEW_CONTAINER.id,
title: localize('explore', "Explorer"),
mnemonicTitle: localize({ key: 'miViewExplorer', comment: ['&& denotes a mnemonic'] }, "&&Explorer"),
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E },
order: 0
},
focusCommand: {
id: 'workbench.explorer.fileView.focus'
}
@@ -282,7 +275,14 @@ export const VIEW_CONTAINER: ViewContainer = viewContainerRegistry.registerViewC
storageId: 'workbench.explorer.views.state',
icon: explorerViewIcon,
alwaysUseContainerInfo: true,
order: 10 // {{SQL CARBON EDIT}} change order
order: 10, // {{SQL CARBON EDIT}} change order
openCommandActionDescriptor: {
id: VIEWLET_ID,
title: localize('explore', "Explorer"),
mnemonicTitle: localize({ key: 'miViewExplorer', comment: ['&& denotes a mnemonic'] }, "&&Explorer"),
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E },
order: 0
},
}, ViewContainerLocation.Sidebar); // {{SQL CARBON EDIT}} not default
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);