From be8a55cef0647cf182fa3980700315d2e01a4a5d Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Wed, 28 Apr 2021 12:17:36 -0700 Subject: [PATCH] Add back open view keybindings (#15264) --- .../notebookExplorer/notebookExplorerViewlet.ts | 6 ++++++ .../contrib/files/browser/explorerViewlet.ts | 16 ++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts b/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts index d73623011d..1bd12acf32 100644 --- a/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts +++ b/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts @@ -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(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` diff --git a/src/vs/workbench/contrib/files/browser/explorerViewlet.ts b/src/vs/workbench/contrib/files/browser/explorerViewlet.ts index 1502cc5329..1839946e47 100644 --- a/src/vs/workbench/contrib/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/contrib/files/browser/explorerViewlet.ts @@ -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(Extensions.ViewsRegistry);