From 550f73e113cf7d42b7d0fa1e90ce3e0bd6364f38 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 31 Jan 2018 10:34:23 +0100 Subject: [PATCH] Fix #41541 --- .../parts/preferences/browser/keybindingsEditor.ts | 10 +++++----- .../workbench/parts/preferences/common/preferences.ts | 4 ++-- .../electron-browser/preferences.contribution.ts | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index 3fd4c0eac5e96..930c3457765f0 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -26,7 +26,7 @@ import { SearchWidget } from 'vs/workbench/parts/preferences/browser/preferences import { DefineKeybindingWidget } from 'vs/workbench/parts/preferences/browser/keybindingWidgets'; import { IPreferencesService, IKeybindingsEditor, CONTEXT_KEYBINDING_FOCUS, CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDINGS_SEARCH_FOCUS, KEYBINDINGS_EDITOR_COMMAND_REMOVE, KEYBINDINGS_EDITOR_COMMAND_COPY, - KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_DEFINE, KEYBINDINGS_EDITOR_COMMAND_SHOW_CONFLICTS + KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_DEFINE, KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR } from 'vs/workbench/parts/preferences/common/preferences'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IKeybindingEditingService } from 'vs/workbench/services/keybinding/common/keybindingEditing'; @@ -259,7 +259,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor this.searchWidget.clear(); } - showConflicts(keybindingEntry: IKeybindingItemEntry): TPromise { + showSimilarKeybindings(keybindingEntry: IKeybindingItemEntry): TPromise { const value = `"${keybindingEntry.keybindingItem.keybinding.getAriaLabel()}"`; if (value !== this.searchWidget.getValue()) { this.searchWidget.setValue(value); @@ -517,10 +517,10 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor private createShowConflictsAction(keybindingItem: IKeybindingItemEntry): IAction { return { - label: localize('showConflictsLabel', "Show Conflicts"), + label: localize('showSameKeybindings', "Show Same Keybindings"), enabled: !!keybindingItem.keybindingItem.keybinding, - id: KEYBINDINGS_EDITOR_COMMAND_SHOW_CONFLICTS, - run: () => this.showConflicts(keybindingItem) + id: KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, + run: () => this.showSimilarKeybindings(keybindingItem) }; } diff --git a/src/vs/workbench/parts/preferences/common/preferences.ts b/src/vs/workbench/parts/preferences/common/preferences.ts index 75536fd71450a..54ee6366022db 100644 --- a/src/vs/workbench/parts/preferences/common/preferences.ts +++ b/src/vs/workbench/parts/preferences/common/preferences.ts @@ -171,7 +171,7 @@ export interface IKeybindingsEditor extends IEditor { resetKeybinding(keybindingEntry: IKeybindingItemEntry): TPromise; copyKeybinding(keybindingEntry: IKeybindingItemEntry): TPromise; copyKeybindingCommand(keybindingEntry: IKeybindingItemEntry): TPromise; - showConflicts(keybindingEntry: IKeybindingItemEntry): TPromise; + showSimilarKeybindings(keybindingEntry: IKeybindingItemEntry): TPromise; } export function getSettingsTargetName(target: ConfigurationTarget, resource: URI, workspaceContextService: IWorkspaceContextService): string { @@ -224,7 +224,7 @@ export const KEYBINDINGS_EDITOR_COMMAND_REMOVE = 'keybindings.editor.removeKeybi export const KEYBINDINGS_EDITOR_COMMAND_RESET = 'keybindings.editor.resetKeybinding'; export const KEYBINDINGS_EDITOR_COMMAND_COPY = 'keybindings.editor.copyKeybindingEntry'; export const KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND = 'keybindings.editor.copyCommandKeybindingEntry'; -export const KEYBINDINGS_EDITOR_COMMAND_SHOW_CONFLICTS = 'keybindings.editor.showConflicts'; +export const KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR = 'keybindings.editor.showConflicts'; export const KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS = 'keybindings.editor.focusKeybindings'; export const FOLDER_SETTINGS_PATH = join('.vscode', 'settings.json'); diff --git a/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.ts b/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.ts index 986c46a2e346c..df56f2f288b8a 100644 --- a/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.ts +++ b/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.ts @@ -19,7 +19,7 @@ import { KeybindingsEditor, KeybindingsEditorInput } from 'vs/workbench/parts/pr import { OpenRawDefaultSettingsAction, OpenGlobalSettingsAction, OpenGlobalKeybindingsAction, OpenGlobalKeybindingsFileAction, OpenWorkspaceSettingsAction, OpenFolderSettingsAction, ConfigureLanguageBasedSettingsAction, OPEN_FOLDER_SETTINGS_COMMAND } from 'vs/workbench/parts/preferences/browser/preferencesActions'; import { IPreferencesService, IKeybindingsEditor, IPreferencesSearchService, CONTEXT_KEYBINDING_FOCUS, CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDINGS_SEARCH_FOCUS, KEYBINDINGS_EDITOR_COMMAND_DEFINE, KEYBINDINGS_EDITOR_COMMAND_REMOVE, KEYBINDINGS_EDITOR_COMMAND_SEARCH, - KEYBINDINGS_EDITOR_COMMAND_COPY, KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_SHOW_CONFLICTS, KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS, KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS + KEYBINDINGS_EDITOR_COMMAND_COPY, KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS, KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS } from 'vs/workbench/parts/preferences/common/preferences'; import { PreferencesService } from 'vs/workbench/parts/preferences/browser/preferencesService'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; @@ -217,13 +217,13 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ }); KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: KEYBINDINGS_EDITOR_COMMAND_SHOW_CONFLICTS, + id: KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDING_FOCUS), primary: null, handler: (accessor, args: any) => { const editor = accessor.get(IWorkbenchEditorService).getActiveEditor() as IKeybindingsEditor; - editor.showConflicts(editor.activeKeybindingEntry); + editor.showSimilarKeybindings(editor.activeKeybindingEntry); } });