rename to title

This commit is contained in:
Sandeep Somavarapu 2021-07-06 16:13:04 +02:00
parent 1c96b77786
commit 0c3d59e4fb
No known key found for this signature in database
GPG key ID: 1FED25EC4646638B
2 changed files with 9 additions and 9 deletions

View file

@ -22,7 +22,7 @@ import { KeybindingsEditorModel, KEYBINDING_ENTRY_TEMPLATE_ID } from 'vs/workben
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IKeybindingService, IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding';
import { DefineKeybindingWidget, KeybindingsSearchWidget } from 'vs/workbench/contrib/preferences/browser/keybindingWidgets';
import { CONTEXT_KEYBINDING_FOCUS, CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDINGS_SEARCH_FOCUS, KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS, KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE, KEYBINDINGS_EDITOR_COMMAND_DEFINE, KEYBINDINGS_EDITOR_COMMAND_REMOVE, KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_COPY, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN, KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, KEYBINDINGS_EDITOR_COMMAND_ADD, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_LABEL } from 'vs/workbench/contrib/preferences/common/preferences';
import { CONTEXT_KEYBINDING_FOCUS, CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDINGS_SEARCH_FOCUS, KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS, KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE, KEYBINDINGS_EDITOR_COMMAND_DEFINE, KEYBINDINGS_EDITOR_COMMAND_REMOVE, KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_COPY, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN, KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, KEYBINDINGS_EDITOR_COMMAND_ADD, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE } from 'vs/workbench/contrib/preferences/common/preferences';
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IKeybindingEditingService } from 'vs/workbench/services/keybinding/common/keybindingEditing';
import { IListContextMenuEvent, IListEvent } from 'vs/base/browser/ui/list/list';
@ -266,9 +266,9 @@ export class KeybindingsEditor extends EditorPane implements IKeybindingsEditorP
await this.clipboardService.writeText(keybinding.keybindingItem.command);
}
async copyKeybindingCommandLabel(keybinding: IKeybindingItemEntry): Promise<void> {
private async copyKeybindingCommandTitle(keybinding: IKeybindingItemEntry): Promise<void> {
this.selectEntry(keybinding);
this.reportKeybindingAction(KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_LABEL, keybinding.keybindingItem.command, keybinding.keybindingItem.keybinding);
this.reportKeybindingAction(KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE, keybinding.keybindingItem.command, keybinding.keybindingItem.keybinding);
await this.clipboardService.writeText(keybinding.keybindingItem.commandLabel);
}
@ -664,7 +664,7 @@ export class KeybindingsEditor extends EditorPane implements IKeybindingsEditorP
getActions: () => [
this.createCopyAction(keybindingItemEntry),
this.createCopyCommandAction(keybindingItemEntry),
this.createCopyCommandLabelAction(keybindingItemEntry),
this.createCopyCommandTitleAction(keybindingItemEntry),
new Separator(),
...(keybindingItemEntry.keybindingItem.keybinding
? [this.createDefineKeybindingAction(keybindingItemEntry), this.createAddKeybindingAction(keybindingItemEntry)]
@ -763,12 +763,12 @@ export class KeybindingsEditor extends EditorPane implements IKeybindingsEditorP
};
}
private createCopyCommandLabelAction(keybinding: IKeybindingItemEntry): IAction {
private createCopyCommandTitleAction(keybinding: IKeybindingItemEntry): IAction {
return <IAction>{
label: localize('copyCommandLabelLabel', "Copy Command Label"),
label: localize('copyCommandTitleLabel', "Copy Command Title"),
enabled: !!keybinding.keybindingItem.commandLabel,
id: KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_LABEL,
run: () => this.copyKeybindingCommandLabel(keybinding)
id: KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE,
run: () => this.copyKeybindingCommandTitle(keybinding)
};
}

View file

@ -63,7 +63,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_COPY_COMMAND_LABEL = 'keybindings.editor.copyCommandLabel';
export const KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE = 'keybindings.editor.copyCommandTitle';
export const KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR = 'keybindings.editor.showConflicts';
export const KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS = 'keybindings.editor.focusKeybindings';
export const KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS = 'keybindings.editor.showDefaultKeybindings';