Skip to content

Commit 7bc29bf

Browse files
author
Benjamin Pasero
authored
debt - fix command alias (microsoft#75242)
1 parent 0b3a2d9 commit 7bc29bf

28 files changed

Lines changed: 104 additions & 101 deletions

File tree

src/vs/editor/contrib/codeAction/codeActionCommands.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export class QuickFixAction extends EditorAction {
207207
super({
208208
id: QuickFixAction.Id,
209209
label: nls.localize('quickfix.trigger.label', "Quick Fix..."),
210-
alias: 'Quick Fix',
210+
alias: 'Quick Fix...',
211211
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),
212212
kbOpts: {
213213
kbExpr: EditorContextKeys.editorTextFocus,
@@ -317,7 +317,7 @@ export class RefactorAction extends EditorAction {
317317
super({
318318
id: RefactorAction.Id,
319319
label: nls.localize('refactor.label', "Refactor..."),
320-
alias: 'Refactor',
320+
alias: 'Refactor...',
321321
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),
322322
kbOpts: {
323323
kbExpr: EditorContextKeys.editorTextFocus,
@@ -380,7 +380,7 @@ export class SourceAction extends EditorAction {
380380
super({
381381
id: SourceAction.Id,
382382
label: nls.localize('source.label', "Source Action..."),
383-
alias: 'Source Action',
383+
alias: 'Source Action...',
384384
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),
385385
menuOpts: {
386386
group: '1_modification',
@@ -486,7 +486,7 @@ export class AutoFixAction extends EditorAction {
486486
super({
487487
id: AutoFixAction.Id,
488488
label: nls.localize('autoFix.label', "Auto Fix..."),
489-
alias: 'Auto Fix',
489+
alias: 'Auto Fix...',
490490
precondition: ContextKeyExpr.and(
491491
EditorContextKeys.writable,
492492
contextKeyForSupportedActions(CodeActionKind.QuickFix)),

src/vs/editor/contrib/format/formatActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class FormatSelectionAction extends EditorAction {
248248
super({
249249
id: 'editor.action.formatSelection',
250250
label: nls.localize('formatSelection.label', "Format Selection"),
251-
alias: 'Format Code',
251+
alias: 'Format Selection',
252252
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasDocumentSelectionFormattingProvider),
253253
kbOpts: {
254254
kbExpr: ContextKeyExpr.and(EditorContextKeys.editorTextFocus, EditorContextKeys.hasDocumentSelectionFormattingProvider),

src/vs/editor/contrib/gotoError/gotoError.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ export class NextMarkerAction extends MarkerNavigationAction {
428428
super(true, false, {
429429
id: NextMarkerAction.ID,
430430
label: NextMarkerAction.LABEL,
431-
alias: 'Go to Next Error or Warning',
431+
alias: 'Go to Next Problem (Error, Warning, Info)',
432432
precondition: EditorContextKeys.writable,
433433
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F8, weight: KeybindingWeight.EditorContrib }
434434
});
@@ -442,7 +442,7 @@ class PrevMarkerAction extends MarkerNavigationAction {
442442
super(false, false, {
443443
id: PrevMarkerAction.ID,
444444
label: PrevMarkerAction.LABEL,
445-
alias: 'Go to Previous Error or Warning',
445+
alias: 'Go to Previous Problem (Error, Warning, Info)',
446446
precondition: EditorContextKeys.writable,
447447
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F8, weight: KeybindingWeight.EditorContrib }
448448
});
@@ -454,7 +454,7 @@ class NextMarkerInFilesAction extends MarkerNavigationAction {
454454
super(true, true, {
455455
id: 'editor.action.marker.nextInFiles',
456456
label: nls.localize('markerAction.nextInFiles.label', "Go to Next Problem in Files (Error, Warning, Info)"),
457-
alias: 'Go to Next Error or Warning in Files',
457+
alias: 'Go to Next Problem in Files (Error, Warning, Info)',
458458
precondition: EditorContextKeys.writable,
459459
kbOpts: {
460460
kbExpr: EditorContextKeys.focus,
@@ -470,7 +470,7 @@ class PrevMarkerInFilesAction extends MarkerNavigationAction {
470470
super(false, true, {
471471
id: 'editor.action.marker.prevInFiles',
472472
label: nls.localize('markerAction.previousInFiles.label', "Go to Previous Problem in Files (Error, Warning, Info)"),
473-
alias: 'Go to Previous Error or Warning in Files',
473+
alias: 'Go to Previous Problem in Files (Error, Warning, Info)',
474474
precondition: EditorContextKeys.writable,
475475
kbOpts: {
476476
kbExpr: EditorContextKeys.focus,

src/vs/editor/contrib/referenceSearch/referenceSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class ReferenceAction extends EditorAction {
6161
super({
6262
id: 'editor.action.referenceSearch.trigger',
6363
label: nls.localize('references.action.label', "Peek References"),
64-
alias: 'Find All References', // leave the alias?
64+
alias: 'Peek References',
6565
precondition: ContextKeyExpr.and(
6666
EditorContextKeys.hasReferenceProvider,
6767
PeekContext.notInPeekEditor,

src/vs/workbench/api/browser/viewsExtensionPoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
321321
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
322322
registry.registerWorkbenchAction(
323323
new SyncActionDescriptor(OpenCustomViewletAction, id, localize('showViewlet', "Show {0}", title)),
324-
'View: Show {0}',
324+
`View: Show ${title}`,
325325
localize('view', "View")
326326
);
327327

src/vs/workbench/browser/actions/layoutActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ CommandsRegistry.registerCommand('_workbench.editor.setGroupOrientation', functi
160160
});
161161

162162
const group = viewCategory;
163-
registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleEditorLayoutAction, ToggleEditorLayoutAction.ID, ToggleEditorLayoutAction.LABEL, { primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_0, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_0 } }), 'View: Flip Editor Group Layout', group);
163+
registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleEditorLayoutAction, ToggleEditorLayoutAction.ID, ToggleEditorLayoutAction.LABEL, { primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_0, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_0 } }), 'View: Toggle Vertical/Horizontal Editor Layout', group);
164164

165165
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
166166
group: 'z_flip',

src/vs/workbench/browser/parts/activitybar/activitybarActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ export class NextSideBarViewAction extends SwitchSideBarViewAction {
260260
}
261261

262262
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
263-
registry.registerWorkbenchAction(new SyncActionDescriptor(PreviousSideBarViewAction, PreviousSideBarViewAction.ID, PreviousSideBarViewAction.LABEL), 'View: Open Previous Side Bar View', nls.localize('view', "View"));
264-
registry.registerWorkbenchAction(new SyncActionDescriptor(NextSideBarViewAction, NextSideBarViewAction.ID, NextSideBarViewAction.LABEL), 'View: Open Next Side Bar View', nls.localize('view', "View"));
263+
registry.registerWorkbenchAction(new SyncActionDescriptor(PreviousSideBarViewAction, PreviousSideBarViewAction.ID, PreviousSideBarViewAction.LABEL), 'View: Previous Side Bar View', nls.localize('view', "View"));
264+
registry.registerWorkbenchAction(new SyncActionDescriptor(NextSideBarViewAction, NextSideBarViewAction.ID, NextSideBarViewAction.LABEL), 'View: Next Side Bar View', nls.localize('view', "View"));
265265

266266
registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
267267

src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ export class BreadcrumbsControl {
490490
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
491491
command: {
492492
id: 'breadcrumbs.toggle',
493-
title: { value: localize('cmd.toggle', "Toggle Breadcrumbs"), original: 'View: Toggle Breadcrumbs' },
494-
category: localize('cmd.category', "View")
493+
title: { value: localize('cmd.toggle', "Toggle Breadcrumbs"), original: 'Toggle Breadcrumbs' },
494+
category: { value: localize('cmd.category', "View"), original: 'View' }
495495
}
496496
});
497497
MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {

src/vs/workbench/browser/parts/editor/editor.contribution.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(ReopenClosedEditorActi
333333
registry.registerWorkbenchAction(new SyncActionDescriptor(ClearRecentFilesAction, ClearRecentFilesAction.ID, ClearRecentFilesAction.LABEL), 'File: Clear Recently Opened', nls.localize('file', "File"));
334334
registry.registerWorkbenchAction(new SyncActionDescriptor(CloseAllEditorsAction, CloseAllEditorsAction.ID, CloseAllEditorsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_W) }), 'View: Close All Editors', category);
335335
registry.registerWorkbenchAction(new SyncActionDescriptor(CloseAllEditorGroupsAction, CloseAllEditorGroupsAction.ID, CloseAllEditorGroupsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_W) }), 'View: Close All Editor Groups', category);
336-
registry.registerWorkbenchAction(new SyncActionDescriptor(CloseLeftEditorsInGroupAction, CloseLeftEditorsInGroupAction.ID, CloseLeftEditorsInGroupAction.LABEL), 'View: Close Editors in Group to the Left', category);
336+
registry.registerWorkbenchAction(new SyncActionDescriptor(CloseLeftEditorsInGroupAction, CloseLeftEditorsInGroupAction.ID, CloseLeftEditorsInGroupAction.LABEL), 'View: Close Editors to the Left in Group', category);
337337
registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInOtherGroupsAction, CloseEditorsInOtherGroupsAction.ID, CloseEditorsInOtherGroupsAction.LABEL), 'View: Close Editors in Other Groups', category);
338338
registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorInAllGroupsAction, CloseEditorInAllGroupsAction.ID, CloseEditorInAllGroupsAction.LABEL), 'View: Close Editor in All Groups', category);
339339
registry.registerWorkbenchAction(new SyncActionDescriptor(SplitEditorAction, SplitEditorAction.ID, SplitEditorAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.US_BACKSLASH }), 'View: Split Editor', category);
@@ -342,8 +342,8 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(SplitEditorLeftAction,
342342
registry.registerWorkbenchAction(new SyncActionDescriptor(SplitEditorRightAction, SplitEditorRightAction.ID, SplitEditorRightAction.LABEL), 'View: Split Editor Right', category);
343343
registry.registerWorkbenchAction(new SyncActionDescriptor(SplitEditorUpAction, SplitEditorUpAction.ID, SplitEditorUpAction.LABEL), 'Split Editor Up', category);
344344
registry.registerWorkbenchAction(new SyncActionDescriptor(SplitEditorDownAction, SplitEditorDownAction.ID, SplitEditorDownAction.LABEL), 'View: Split Editor Down', category);
345-
registry.registerWorkbenchAction(new SyncActionDescriptor(JoinTwoGroupsAction, JoinTwoGroupsAction.ID, JoinTwoGroupsAction.LABEL), 'View: Join Editors of Two Groups', category);
346-
registry.registerWorkbenchAction(new SyncActionDescriptor(JoinAllGroupsAction, JoinAllGroupsAction.ID, JoinAllGroupsAction.LABEL), 'View: Join Editors of All Groups', category);
345+
registry.registerWorkbenchAction(new SyncActionDescriptor(JoinTwoGroupsAction, JoinTwoGroupsAction.ID, JoinTwoGroupsAction.LABEL), 'View: Join Editor Group with Next Group', category);
346+
registry.registerWorkbenchAction(new SyncActionDescriptor(JoinAllGroupsAction, JoinAllGroupsAction.ID, JoinAllGroupsAction.LABEL), 'View: Join All Editor Groups', category);
347347
registry.registerWorkbenchAction(new SyncActionDescriptor(NavigateBetweenGroupsAction, NavigateBetweenGroupsAction.ID, NavigateBetweenGroupsAction.LABEL), 'View: Navigate Between Editor Groups', category);
348348
registry.registerWorkbenchAction(new SyncActionDescriptor(ResetGroupSizesAction, ResetGroupSizesAction.ID, ResetGroupSizesAction.LABEL), 'View: Reset Editor Group Sizes', category);
349349
registry.registerWorkbenchAction(new SyncActionDescriptor(MaximizeGroupAction, MaximizeGroupAction.ID, MaximizeGroupAction.LABEL), 'View: Maximize Editor Group and Hide Side Bar', category);
@@ -608,11 +608,12 @@ appendEditorToolItem(
608608
);
609609

610610
// Editor Commands for Command Palette
611-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: editorCommands.KEEP_EDITOR_COMMAND_ID, title: { value: nls.localize('keepEditor', "Keep Editor"), original: 'View: Keep Editor' }, category }, when: ContextKeyExpr.has('config.workbench.editor.enablePreview') });
612-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: editorCommands.CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: { value: nls.localize('closeEditorsInGroup', "Close All Editors in Group"), original: 'View: Close All Editors in Group' }, category } });
613-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: editorCommands.CLOSE_SAVED_EDITORS_COMMAND_ID, title: { value: nls.localize('closeSavedEditors', "Close Saved Editors in Group"), original: 'View: Close Saved Editors in Group' }, category } });
614-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: editorCommands.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, title: { value: nls.localize('closeOtherEditors', "Close Other Editors in Group"), original: 'View: Close Other Editors in Group' }, category } });
615-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: editorCommands.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID, title: { value: nls.localize('closeRightEditors', "Close Editors to the Right in Group"), original: 'View: Close Editors to the Right in Group' }, category } });
611+
const viewCategory = { value: nls.localize('view', "View"), original: 'View' };
612+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: editorCommands.KEEP_EDITOR_COMMAND_ID, title: { value: nls.localize('keepEditor', "Keep Editor"), original: 'Keep Editor' }, category: viewCategory }, when: ContextKeyExpr.has('config.workbench.editor.enablePreview') });
613+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: editorCommands.CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: { value: nls.localize('closeEditorsInGroup', "Close All Editors in Group"), original: 'Close All Editors in Group' }, category: viewCategory } });
614+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: editorCommands.CLOSE_SAVED_EDITORS_COMMAND_ID, title: { value: nls.localize('closeSavedEditors', "Close Saved Editors in Group"), original: 'Close Saved Editors in Group' }, category: viewCategory } });
615+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: editorCommands.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, title: { value: nls.localize('closeOtherEditors', "Close Other Editors in Group"), original: 'Close Other Editors in Group' }, category: viewCategory } });
616+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: editorCommands.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID, title: { value: nls.localize('closeRightEditors', "Close Editors to the Right in Group"), original: 'Close Editors to the Right in Group' }, category: viewCategory } });
616617

617618
// File menu
618619
MenuRegistry.appendMenuItem(MenuId.MenubarRecentMenu, {

src/vs/workbench/browser/parts/notifications/notificationsCommands.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ export function registerNotificationCommands(center: INotificationsCenterControl
218218
CommandsRegistry.registerCommand(CLEAR_ALL_NOTIFICATIONS, () => center.clearAll());
219219

220220
// Commands for Command Palette
221-
const category = localize('notifications', "Notifications");
222-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: SHOW_NOTIFICATIONS_CENTER, title: { value: localize('showNotifications', "Show Notifications"), original: 'Notifications: Show Notifications' }, category }, when: NotificationsCenterVisibleContext.toNegated() });
223-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: HIDE_NOTIFICATIONS_CENTER, title: { value: localize('hideNotifications', "Hide Notifications"), original: 'Notifications: Hide Notifications' }, category }, when: NotificationsCenterVisibleContext });
224-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLEAR_ALL_NOTIFICATIONS, title: { value: localize('clearAllNotifications', "Clear All Notifications"), original: 'Notifications: Clear All Notifications' }, category } });
221+
const category = { value: localize('notifications', "Notifications"), original: 'Notifications' };
222+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: SHOW_NOTIFICATIONS_CENTER, title: { value: localize('showNotifications', "Show Notifications"), original: 'Show Notifications' }, category }, when: NotificationsCenterVisibleContext.toNegated() });
223+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: HIDE_NOTIFICATIONS_CENTER, title: { value: localize('hideNotifications', "Hide Notifications"), original: 'Hide Notifications' }, category }, when: NotificationsCenterVisibleContext });
224+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLEAR_ALL_NOTIFICATIONS, title: { value: localize('clearAllNotifications', "Clear All Notifications"), original: 'Clear All Notifications' }, category } });
225225
}

0 commit comments

Comments
 (0)