提交 3c32ff2c 编写于 作者: B Benjamin Pasero

cleanup action ids

上级 32655763
......@@ -571,9 +571,9 @@ export class VSCodeMenu {
let switchGroupMenu = new Menu();
let focusFirstGroup = this.createMenuItem(nls.localize({ key: 'miFocusFirstGroup', comment: ['&& denotes a mnemonic'] }, "&&Left Group"), 'workbench.action.focusFirstEditor');
let focusSecondGroup = this.createMenuItem(nls.localize({ key: 'miFocusSecondGroup', comment: ['&& denotes a mnemonic'] }, "&&Side Group"), 'workbench.action.focusSecondEditor');
let focusThirdGroup = this.createMenuItem(nls.localize({ key: 'miFocusThirdGroup', comment: ['&& denotes a mnemonic'] }, "&&Right Group"), 'workbench.action.focusThirdEditor');
let focusFirstGroup = this.createMenuItem(nls.localize({ key: 'miFocusFirstGroup', comment: ['&& denotes a mnemonic'] }, "&&Left Group"), 'workbench.action.focusFirstEditorGroup');
let focusSecondGroup = this.createMenuItem(nls.localize({ key: 'miFocusSecondGroup', comment: ['&& denotes a mnemonic'] }, "&&Side Group"), 'workbench.action.focusSecondEditorGroup');
let focusThirdGroup = this.createMenuItem(nls.localize({ key: 'miFocusThirdGroup', comment: ['&& denotes a mnemonic'] }, "&&Right Group"), 'workbench.action.focusThirdEditorGroup');
let nextGroup = this.createMenuItem(nls.localize({ key: 'miNextGroup', comment: ['&& denotes a mnemonic'] }, "&&Next Group"), 'workbench.action.focusNextGroup');
let previousGroup = this.createMenuItem(nls.localize({ key: 'miPreviousGroup', comment: ['&& denotes a mnemonic'] }, "&&Previous Group"), 'workbench.action.focusPreviousGroup');
......
......@@ -294,10 +294,8 @@ function navigateKeybinding(shift: boolean): IKeybindings {
const category = nls.localize('view', "View");
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorInGroupAction, OpenPreviousEditorInGroupAction.ID, OpenPreviousEditorInGroupAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyCode.Tab,
secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab],
mac: {
primary: KeyMod.WinCtrl | KeyCode.Tab,
secondary: [KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab]
primary: KeyMod.WinCtrl | KeyCode.Tab
}
}), 'Open Previous in Editor Group');
registry.registerWorkbenchAction(new SyncActionDescriptor(ShowAllEditorsAction, ShowAllEditorsAction.ID, ShowAllEditorsAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Tab }), 'View: Show All Editors', category);
......@@ -349,6 +347,6 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(NavigateBackwardsActio
}), 'Go Back');
registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalQuickOpenAction, GlobalQuickOpenAction.ID, GlobalQuickOpenAction.LABEL, quickOpenKb), 'Go to File...');
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorAction, OpenPreviousEditorAction.ID, OpenPreviousEditorAction.LABEL), 'Navigate History');
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorAction, OpenPreviousEditorAction.ID, OpenPreviousEditorAction.LABEL), 'Open Previous Editor from History');
registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigateNextAction, QuickOpenNavigateNextAction.ID, QuickOpenNavigateNextAction.LABEL, navigateKeybinding(false), KbExpr.has('inQuickOpen')), 'Navigate Next in Quick Open');
registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigatePreviousAction, QuickOpenNavigatePreviousAction.ID, QuickOpenNavigatePreviousAction.LABEL, navigateKeybinding(true), KbExpr.has('inQuickOpen'), KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Navigate Previous in Quick Open');
\ No newline at end of file
......@@ -117,7 +117,7 @@ export class NavigateBetweenGroupsAction extends Action {
export class FocusFirstGroupAction extends Action {
public static ID = 'workbench.action.focusFirstEditor';
public static ID = 'workbench.action.focusFirstEditorGroup';
public static LABEL = nls.localize('focusFirstEditorGroup', "Focus Left Editor Group");
constructor(
......@@ -226,7 +226,7 @@ export abstract class BaseFocusSideGroupAction extends Action {
export class FocusSecondGroupAction extends BaseFocusSideGroupAction {
public static ID = 'workbench.action.focusSecondEditor';
public static ID = 'workbench.action.focusSecondEditorGroup';
public static LABEL = nls.localize('focusSecondEditorGroup', "Focus Center Editor Group");
constructor(
......@@ -249,7 +249,7 @@ export class FocusSecondGroupAction extends BaseFocusSideGroupAction {
export class FocusThirdGroupAction extends BaseFocusSideGroupAction {
public static ID = 'workbench.action.focusThirdEditor';
public static ID = 'workbench.action.focusThirdEditorGroup';
public static LABEL = nls.localize('focusThirdEditorGroup', "Focus Right Editor Group");
constructor(
......@@ -573,7 +573,7 @@ export class CloseAllEditorsInGroupAction extends Action {
export class MoveGroupLeftAction extends Action {
public static ID = 'workbench.action.moveActiveEditorLeft';
public static ID = 'workbench.action.moveActiveEditorGroupLeft';
public static LABEL = nls.localize('moveActiveGroupLeft', "Move Editor Group Left");
constructor(id: string, label: string, @IWorkbenchEditorService private editorService: IWorkbenchEditorService) {
......@@ -601,7 +601,7 @@ export class MoveGroupLeftAction extends Action {
export class MoveGroupRightAction extends Action {
public static ID = 'workbench.action.moveActiveEditorRight';
public static ID = 'workbench.action.moveActiveEditorGroupRight';
public static LABEL = nls.localize('moveActiveGroupRight', "Move Editor Group Right");
constructor(id: string, label: string, @IWorkbenchEditorService private editorService: IWorkbenchEditorService) {
......@@ -912,7 +912,7 @@ export class GlobalQuickOpenAction extends Action {
export class OpenPreviousEditorAction extends Action {
public static ID = 'workbench.action.openPreviousEditor';
public static LABEL = nls.localize('navigateEditorHistoryByInput', "Navigate History");
public static LABEL = nls.localize('navigateEditorHistoryByInput', "Open Previous Editor from History");
constructor(
id: string,
......@@ -992,43 +992,4 @@ export class QuickOpenNavigatePreviousAction extends BaseQuickOpenNavigateAction
interface IEditorPickOpenEntry extends IPickOpenEntry {
identifier: IEditorIdentifier;
}
// export class ShowAllEditorsAction extends Action {
// public static ID = 'workbench.action.showAllEditors';
// public static LABEL = nls.localize('showAllEditors', "Show All Editors");
// constructor(
// id: string,
// label: string,
// @IQuickOpenService private quickOpenService: IQuickOpenService,
// @IWorkbenchEditorService private editorService: IWorkbenchEditorService
// ) {
// super(id, label);
// }
// public run(event?: any): TPromise<any> {
// const stacks = this.editorService.getStacksModel();
// const entrys: IEditorPickOpenEntry[] = [];
// let identifier = 0;
// stacks.groups.forEach(group => {
// group.getEditors().forEach((editor, index) => {
// entrys.push({
// id: String(identifier++),
// label: editor.isDirty() ? `\u25cf ${editor.getName()}` : editor.getName(),
// description: editor.getDescription(),
// identifier: { editor: editor, group: group },
// separator: index === 0 ? { border: true, label: group.label } : void 0
// });
// });
// });
// return this.quickOpenService.pick(entrys, { matchOnDescription: true }).then(pick => {
// if (pick) {
// return this.editorService.openEditor(pick.identifier.editor, null, stacks.positionOfGroup(pick.identifier.group));
// }
// });
// }
// }
\ No newline at end of file
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册