import { Registry } from '../../../../platform/registry/common/platform.js';
import { localizeWithPath, localize2WithPath } from '../../../../nls.js';
import { EditorPaneDescriptor } from '../../editor.js';
import { EditorExtensions } from '../../../common/editor.js';
import { IsAuxiliaryEditorPartContext, ActiveEditorGroupLockedContext, EditorPartMultipleEditorGroupsContext, MultipleEditorGroupsContext, InEditorZenModeContext, EditorGroupEditorsCountContext, ActiveEditorLastInGroupContext, EditorTabsVisibleContext, ActiveEditorAvailableEditorIdsContext, ActiveEditorPinnedContext, ActiveEditorStickyContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, EditorPartMaximizedEditorGroupContext, TextCompareEditorActiveContext, ActiveEditorDirtyContext, ActiveCompareEditorCanSwapContext } from '../../../common/contextkeys.js';
import { SideBySideEditorInput, SideBySideEditorInputSerializer } from '../../../common/editor/sideBySideEditorInput.js';
import { TextResourceEditor } from './textResourceEditor.js';
import { SideBySideEditor } from './sideBySideEditor.js';
import { DiffEditorInput, DiffEditorInputSerializer } from '../../../common/editor/diffEditorInput.js';
import { UntitledTextEditorInput } from '../../../services/untitled/common/untitledTextEditorInput.js';
import { TextResourceEditorInput } from '../../../common/editor/textResourceEditorInput.js';
import { TextDiffEditor } from './textDiffEditor.js';
import { BinaryResourceDiffEditor } from './binaryDiffEditor.js';
import { EditorStatusContribution, ChangeLanguageAction, ChangeEOLAction, ChangeEncodingAction } from './editorStatus.js';
import { Categories } from '../../../../platform/action/common/actionCommonCategories.js';
import { registerAction2, MenuRegistry, MenuId } from '../../../../platform/actions/common/actions.js';
import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js';
import { ShowEditorsInActiveGroupByMostRecentlyUsedAction, ShowAllEditorsByAppearanceAction, ShowAllEditorsByMostRecentlyUsedAction, NavigateBackwardsAction, NavigateForwardAction, ReopenClosedEditorAction, ClearRecentFilesAction, EditorLayoutSingleAction, EditorLayoutTwoColumnsAction, EditorLayoutThreeColumnsAction, EditorLayoutTwoRowsAction, EditorLayoutThreeRowsAction, EditorLayoutTwoByTwoGridAction, EditorLayoutTwoRowsRightAction, EditorLayoutTwoColumnsBottomAction, OpenNextEditor, OpenPreviousEditor, OpenNextEditorInGroup, OpenPreviousEditorInGroup, OpenFirstEditorInGroup, OpenLastEditorInGroup, OpenNextRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction, OpenNextRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction, CloseAllEditorsAction, CloseAllEditorGroupsAction, CloseLeftEditorsInGroupAction, CloseEditorsInOtherGroupsAction, CloseEditorInAllGroupsAction, RevertAndCloseEditorAction, SplitEditorAction, SplitEditorOrthogonalAction, SplitEditorLeftAction, SplitEditorRightAction, SplitEditorUpAction, SplitEditorDownAction, JoinTwoGroupsAction, JoinAllGroupsAction, NavigateBetweenGroupsAction, ResetGroupSizesAction, ToggleGroupSizesAction, MaximizeGroupHideSidebarAction, ToggleMaximizeEditorGroupAction, MinimizeOtherGroupsAction, MinimizeOtherGroupsHideSidebarAction, MoveEditorLeftInGroupAction, MoveEditorRightInGroupAction, MoveGroupLeftAction, MoveGroupRightAction, MoveGroupUpAction, MoveGroupDownAction, DuplicateGroupLeftAction, DuplicateGroupRightAction, DuplicateGroupUpAction, DuplicateGroupDownAction, MoveEditorToPreviousGroupAction, MoveEditorToNextGroupAction, MoveEditorToFirstGroupAction, MoveEditorToLastGroupAction, MoveEditorToLeftGroupAction, MoveEditorToRightGroupAction, MoveEditorToAboveGroupAction, MoveEditorToBelowGroupAction, SplitEditorToPreviousGroupAction, SplitEditorToNextGroupAction, SplitEditorToFirstGroupAction, SplitEditorToLastGroupAction, SplitEditorToLeftGroupAction, SplitEditorToRightGroupAction, SplitEditorToAboveGroupAction, SplitEditorToBelowGroupAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusLastGroupAction, FocusPreviousGroup, FocusNextGroup, FocusLeftGroup, FocusRightGroup, FocusAboveGroup, FocusBelowGroup, NewEditorGroupLeftAction, NewEditorGroupRightAction, NewEditorGroupAboveAction, NewEditorGroupBelowAction, NavigatePreviousAction, NavigateForwardInEditsAction, NavigateBackwardsInEditsAction, NavigatePreviousInEditsAction, NavigateToLastEditLocationAction, NavigateForwardInNavigationsAction, NavigateBackwardsInNavigationsAction, NavigatePreviousInNavigationsAction, NavigateToLastNavigationLocationAction, ClearEditorHistoryAction, ToggleEditorTypeAction, ReOpenInTextEditorAction, QuickAccessPreviousRecentlyUsedEditorAction, QuickAccessLeastRecentlyUsedEditorAction, QuickAccessPreviousRecentlyUsedEditorInGroupAction, QuickAccessLeastRecentlyUsedEditorInGroupAction, QuickAccessPreviousEditorFromHistoryAction, MoveEditorToNewWindowAction, CopyEditorToNewindowAction, MoveEditorGroupToNewWindowAction, CopyEditorGroupToNewWindowAction, RestoreEditorsToMainWindowAction, NewEmptyEditorWindowAction } from './editorActions.js';
import { setup, LOCK_GROUP_COMMAND_ID, UNLOCK_GROUP_COMMAND_ID, CLOSE_EDITOR_GROUP_COMMAND_ID, SPLIT_EDITOR_UP, SPLIT_EDITOR_DOWN, SPLIT_EDITOR_LEFT, SPLIT_EDITOR_RIGHT, NEW_EMPTY_EDITOR_WINDOW_COMMAND_ID, TOGGLE_LOCK_GROUP_COMMAND_ID, MOVE_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, COPY_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID, CLOSE_SAVED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, REOPEN_WITH_COMMAND_ID, KEEP_EDITOR_COMMAND_ID, PIN_EDITOR_COMMAND_ID, UNPIN_EDITOR_COMMAND_ID, SPLIT_EDITOR_IN_GROUP, JOIN_EDITOR_IN_GROUP, MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, SHOW_EDITORS_IN_GROUP, TOGGLE_KEEP_EDITORS_COMMAND_ID, TOGGLE_MAXIMIZE_EDITOR_GROUP, CLOSE_PINNED_EDITOR_COMMAND_ID, CLOSE_EDITORS_AND_GROUP_COMMAND_ID, FOCUS_FIRST_SIDE_EDITOR, FOCUS_SECOND_SIDE_EDITOR, SPLIT_EDITOR, TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT } from './editorCommands.js';
import { TOGGLE_DIFF_SIDE_BY_SIDE, TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE, GOTO_PREVIOUS_CHANGE, GOTO_NEXT_CHANGE, DIFF_SWAP_SIDES } from './diffEditorCommands.js';
import { getQuickNavigateHandler, inQuickPickContext } from '../../quickaccess.js';
import { KeybindingsRegistry } from '../../../../platform/keybinding/common/keybindingsRegistry.js';
import { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';
import { isMacintosh } from '../../../../base/common/platform.js';
import { registerEditorContribution } from '../../../../editor/browser/editorExtensions.js';
import { FloatingEditorClickMenu } from '../../codeeditor.js';
import { registerWorkbenchContribution2 } from '../../../common/contributions.js';
import { Extensions } from '../../../../platform/quickinput/common/quickAccess.js';
import { ActiveGroupEditorsByMostRecentlyUsedQuickAccess, AllEditorsByAppearanceQuickAccess, AllEditorsByMostRecentlyUsedQuickAccess } from './editorQuickAccess.js';
import { FileAccess } from '../../../../base/common/network.js';
import { Codicon } from '../../../../base/common/codicons.js';
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
import { UntitledTextEditorInputSerializer, UntitledTextEditorWorkingCopyEditorHandler } from '../../../services/untitled/common/untitledTextEditorHandler.js';
import { DynamicEditorConfigurations } from './editorConfiguration.js';
import { ShowMultipleEditorTabsAction, ShowSingleEditorTabAction, HideEditorTabsAction, ZenShowMultipleEditorTabsAction, ZenShowSingleEditorTabAction, ZenHideEditorTabsAction, EditorActionsDefaultAction, EditorActionsTitleBarAction, HideEditorActionsAction } from '../../actions/layoutActions.js';
import { EditorContextKeys } from '../../../../editor/common/editorContextKeys.js';
import './editor.autosave.contribution.js';
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(TextResourceEditor, TextResourceEditor.ID, ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'textEditor',
    "Text Editor"
))), [
    ( new SyncDescriptor(UntitledTextEditorInput)),
    ( new SyncDescriptor(TextResourceEditorInput))
]);
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(TextDiffEditor, TextDiffEditor.ID, ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'textDiffEditor',
    "Text Diff Editor"
))), [
    ( new SyncDescriptor(DiffEditorInput))
]);
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(BinaryResourceDiffEditor, BinaryResourceDiffEditor.ID, ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'binaryDiffEditor',
    "Binary Diff Editor"
))), [
    ( new SyncDescriptor(DiffEditorInput))
]);
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(SideBySideEditor, SideBySideEditor.ID, ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'sideBySideEditor',
    "Side by Side Editor"
))), [
    ( new SyncDescriptor(SideBySideEditorInput))
]);
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(UntitledTextEditorInput.ID, UntitledTextEditorInputSerializer);
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(SideBySideEditorInput.ID, SideBySideEditorInputSerializer);
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(DiffEditorInput.ID, DiffEditorInputSerializer);
registerWorkbenchContribution2(EditorStatusContribution.ID, EditorStatusContribution, 2 );
registerWorkbenchContribution2(UntitledTextEditorWorkingCopyEditorHandler.ID, UntitledTextEditorWorkingCopyEditorHandler, 2 );
registerWorkbenchContribution2(DynamicEditorConfigurations.ID, DynamicEditorConfigurations, 2 );
registerEditorContribution(FloatingEditorClickMenu.ID, FloatingEditorClickMenu, 1 );
const quickAccessRegistry = ( Registry.as(Extensions.Quickaccess));
const editorPickerContextKey = 'inEditorsPicker';
const editorPickerContext = ( ContextKeyExpr.and(inQuickPickContext, ( ContextKeyExpr.has(editorPickerContextKey))));
quickAccessRegistry.registerQuickAccessProvider({
    ctor: ActiveGroupEditorsByMostRecentlyUsedQuickAccess,
    prefix: ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX,
    contextKey: editorPickerContextKey,
    placeholder: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'editorQuickAccessPlaceholder',
        "Type the name of an editor to open it."
    )),
    helpEntries: [{ description: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'activeGroupEditorsByMostRecentlyUsedQuickAccess',
        "Show Editors in Active Group by Most Recently Used"
    )), commandId: ShowEditorsInActiveGroupByMostRecentlyUsedAction.ID }]
});
quickAccessRegistry.registerQuickAccessProvider({
    ctor: AllEditorsByAppearanceQuickAccess,
    prefix: AllEditorsByAppearanceQuickAccess.PREFIX,
    contextKey: editorPickerContextKey,
    placeholder: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'editorQuickAccessPlaceholder',
        "Type the name of an editor to open it."
    )),
    helpEntries: [{ description: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'allEditorsByAppearanceQuickAccess',
        "Show All Opened Editors By Appearance"
    )), commandId: ShowAllEditorsByAppearanceAction.ID }]
});
quickAccessRegistry.registerQuickAccessProvider({
    ctor: AllEditorsByMostRecentlyUsedQuickAccess,
    prefix: AllEditorsByMostRecentlyUsedQuickAccess.PREFIX,
    contextKey: editorPickerContextKey,
    placeholder: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'editorQuickAccessPlaceholder',
        "Type the name of an editor to open it."
    )),
    helpEntries: [{ description: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'allEditorsByMostRecentlyUsedQuickAccess',
        "Show All Opened Editors By Most Recently Used"
    )), commandId: ShowAllEditorsByMostRecentlyUsedAction.ID }]
});
registerAction2(ChangeLanguageAction);
registerAction2(ChangeEOLAction);
registerAction2(ChangeEncodingAction);
registerAction2(NavigateForwardAction);
registerAction2(NavigateBackwardsAction);
registerAction2(OpenNextEditor);
registerAction2(OpenPreviousEditor);
registerAction2(OpenNextEditorInGroup);
registerAction2(OpenPreviousEditorInGroup);
registerAction2(OpenFirstEditorInGroup);
registerAction2(OpenLastEditorInGroup);
registerAction2(OpenNextRecentlyUsedEditorAction);
registerAction2(OpenPreviousRecentlyUsedEditorAction);
registerAction2(OpenNextRecentlyUsedEditorInGroupAction);
registerAction2(OpenPreviousRecentlyUsedEditorInGroupAction);
registerAction2(ReopenClosedEditorAction);
registerAction2(ClearRecentFilesAction);
registerAction2(ShowAllEditorsByAppearanceAction);
registerAction2(ShowAllEditorsByMostRecentlyUsedAction);
registerAction2(ShowEditorsInActiveGroupByMostRecentlyUsedAction);
registerAction2(CloseAllEditorsAction);
registerAction2(CloseAllEditorGroupsAction);
registerAction2(CloseLeftEditorsInGroupAction);
registerAction2(CloseEditorsInOtherGroupsAction);
registerAction2(CloseEditorInAllGroupsAction);
registerAction2(RevertAndCloseEditorAction);
registerAction2(SplitEditorAction);
registerAction2(SplitEditorOrthogonalAction);
registerAction2(SplitEditorLeftAction);
registerAction2(SplitEditorRightAction);
registerAction2(SplitEditorUpAction);
registerAction2(SplitEditorDownAction);
registerAction2(JoinTwoGroupsAction);
registerAction2(JoinAllGroupsAction);
registerAction2(NavigateBetweenGroupsAction);
registerAction2(ResetGroupSizesAction);
registerAction2(ToggleGroupSizesAction);
registerAction2(MaximizeGroupHideSidebarAction);
registerAction2(ToggleMaximizeEditorGroupAction);
registerAction2(MinimizeOtherGroupsAction);
registerAction2(MinimizeOtherGroupsHideSidebarAction);
registerAction2(MoveEditorLeftInGroupAction);
registerAction2(MoveEditorRightInGroupAction);
registerAction2(MoveGroupLeftAction);
registerAction2(MoveGroupRightAction);
registerAction2(MoveGroupUpAction);
registerAction2(MoveGroupDownAction);
registerAction2(DuplicateGroupLeftAction);
registerAction2(DuplicateGroupRightAction);
registerAction2(DuplicateGroupUpAction);
registerAction2(DuplicateGroupDownAction);
registerAction2(MoveEditorToPreviousGroupAction);
registerAction2(MoveEditorToNextGroupAction);
registerAction2(MoveEditorToFirstGroupAction);
registerAction2(MoveEditorToLastGroupAction);
registerAction2(MoveEditorToLeftGroupAction);
registerAction2(MoveEditorToRightGroupAction);
registerAction2(MoveEditorToAboveGroupAction);
registerAction2(MoveEditorToBelowGroupAction);
registerAction2(SplitEditorToPreviousGroupAction);
registerAction2(SplitEditorToNextGroupAction);
registerAction2(SplitEditorToFirstGroupAction);
registerAction2(SplitEditorToLastGroupAction);
registerAction2(SplitEditorToLeftGroupAction);
registerAction2(SplitEditorToRightGroupAction);
registerAction2(SplitEditorToAboveGroupAction);
registerAction2(SplitEditorToBelowGroupAction);
registerAction2(FocusActiveGroupAction);
registerAction2(FocusFirstGroupAction);
registerAction2(FocusLastGroupAction);
registerAction2(FocusPreviousGroup);
registerAction2(FocusNextGroup);
registerAction2(FocusLeftGroup);
registerAction2(FocusRightGroup);
registerAction2(FocusAboveGroup);
registerAction2(FocusBelowGroup);
registerAction2(NewEditorGroupLeftAction);
registerAction2(NewEditorGroupRightAction);
registerAction2(NewEditorGroupAboveAction);
registerAction2(NewEditorGroupBelowAction);
registerAction2(NavigatePreviousAction);
registerAction2(NavigateForwardInEditsAction);
registerAction2(NavigateBackwardsInEditsAction);
registerAction2(NavigatePreviousInEditsAction);
registerAction2(NavigateToLastEditLocationAction);
registerAction2(NavigateForwardInNavigationsAction);
registerAction2(NavigateBackwardsInNavigationsAction);
registerAction2(NavigatePreviousInNavigationsAction);
registerAction2(NavigateToLastNavigationLocationAction);
registerAction2(ClearEditorHistoryAction);
registerAction2(EditorLayoutSingleAction);
registerAction2(EditorLayoutTwoColumnsAction);
registerAction2(EditorLayoutThreeColumnsAction);
registerAction2(EditorLayoutTwoRowsAction);
registerAction2(EditorLayoutThreeRowsAction);
registerAction2(EditorLayoutTwoByTwoGridAction);
registerAction2(EditorLayoutTwoRowsRightAction);
registerAction2(EditorLayoutTwoColumnsBottomAction);
registerAction2(ToggleEditorTypeAction);
registerAction2(ReOpenInTextEditorAction);
registerAction2(QuickAccessPreviousRecentlyUsedEditorAction);
registerAction2(QuickAccessLeastRecentlyUsedEditorAction);
registerAction2(QuickAccessPreviousRecentlyUsedEditorInGroupAction);
registerAction2(QuickAccessLeastRecentlyUsedEditorInGroupAction);
registerAction2(QuickAccessPreviousEditorFromHistoryAction);
registerAction2(MoveEditorToNewWindowAction);
registerAction2(CopyEditorToNewindowAction);
registerAction2(MoveEditorGroupToNewWindowAction);
registerAction2(CopyEditorGroupToNewWindowAction);
registerAction2(RestoreEditorsToMainWindowAction);
registerAction2(NewEmptyEditorWindowAction);
const quickAccessNavigateNextInEditorPickerId = 'workbench.action.quickOpenNavigateNextInEditorPicker';
KeybindingsRegistry.registerCommandAndKeybindingRule({
    id: quickAccessNavigateNextInEditorPickerId,
    weight: 200  + 50,
    handler: getQuickNavigateHandler(quickAccessNavigateNextInEditorPickerId, true),
    when: editorPickerContext,
    primary: 2048  | 2 ,
    mac: { primary: 256  | 2  }
});
const quickAccessNavigatePreviousInEditorPickerId = 'workbench.action.quickOpenNavigatePreviousInEditorPicker';
KeybindingsRegistry.registerCommandAndKeybindingRule({
    id: quickAccessNavigatePreviousInEditorPickerId,
    weight: 200  + 50,
    handler: getQuickNavigateHandler(quickAccessNavigatePreviousInEditorPickerId, false),
    when: editorPickerContext,
    primary: 2048  | 1024  | 2 ,
    mac: { primary: 256  | 1024  | 2  }
});
setup();
if (isMacintosh) {
    MenuRegistry.appendMenuItem(MenuId.TouchBarContext, {
        command: { id: NavigateBackwardsAction.ID, title: NavigateBackwardsAction.LABEL, icon: { dark: ( FileAccess.asFileUri('vs/workbench/browser/parts/editor/media/back-tb.png')) } },
        group: 'navigation',
        order: 0
    });
    MenuRegistry.appendMenuItem(MenuId.TouchBarContext, {
        command: { id: NavigateForwardAction.ID, title: NavigateForwardAction.LABEL, icon: { dark: ( FileAccess.asFileUri('vs/workbench/browser/parts/editor/media/forward-tb.png')) } },
        group: 'navigation',
        order: 1
    });
}
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroup, { command: { id: LOCK_GROUP_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'lockGroupAction',
    "Lock Group"
)), icon: Codicon.unlock }, group: 'navigation', order: 10, when: ( ContextKeyExpr.and(IsAuxiliaryEditorPartContext, ( ActiveEditorGroupLockedContext.toNegated()))) });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroup, { command: { id: UNLOCK_GROUP_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'unlockGroupAction',
    "Unlock Group"
)), icon: Codicon.lock, toggled: ContextKeyExpr.true() }, group: 'navigation', order: 10, when: ActiveEditorGroupLockedContext });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroup, { command: { id: CLOSE_EDITOR_GROUP_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeGroupAction',
    "Close Group"
)), icon: Codicon.close }, group: 'navigation', order: 20, when: ( ContextKeyExpr.or(IsAuxiliaryEditorPartContext, EditorPartMultipleEditorGroupsContext)) });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_UP, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitUp',
    "Split Up"
)) }, group: '2_split', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_DOWN, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitDown',
    "Split Down"
)) }, group: '2_split', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_LEFT, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitLeft',
    "Split Left"
)) }, group: '2_split', order: 30 });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_RIGHT, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitRight',
    "Split Right"
)) }, group: '2_split', order: 40 });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: NEW_EMPTY_EDITOR_WINDOW_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'newWindow',
    "New Window"
)) }, group: '3_window', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: TOGGLE_LOCK_GROUP_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'toggleLockGroup',
    "Lock Group"
)), toggled: ActiveEditorGroupLockedContext }, group: '4_lock', order: 10, when: ( IsAuxiliaryEditorPartContext.toNegated())  });
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: CLOSE_EDITOR_GROUP_COMMAND_ID, title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")) }, group: '5_close', order: 10, when: MultipleEditorGroupsContext });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_UP, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitUp',
    "Split Up"
)) }, group: '2_split', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_DOWN, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitDown',
    "Split Down"
)) }, group: '2_split', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_LEFT, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitLeft',
    "Split Left"
)) }, group: '2_split', order: 30 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_RIGHT, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitRight',
    "Split Right"
)) }, group: '2_split', order: 40 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: MOVE_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'moveEditorGroupToNewWindow',
    "Move into New Window"
)) }, group: '3_window', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: COPY_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'copyEditorGroupToNewWindow',
    "Copy into New Window"
)) }, group: '3_window', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { submenu: MenuId.EditorTabsBarShowTabsSubmenu, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'tabBar',
    "Tab Bar"
)), group: '4_config', order: 10, when: ( InEditorZenModeContext.negate()) });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: ShowMultipleEditorTabsAction.ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'multipleTabs',
    "Multiple Tabs"
)), toggled: ( ContextKeyExpr.equals('config.workbench.editor.showTabs', 'multiple')) }, group: '1_config', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: ShowSingleEditorTabAction.ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'singleTab',
    "Single Tab"
)), toggled: ( ContextKeyExpr.equals('config.workbench.editor.showTabs', 'single')) }, group: '1_config', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: HideEditorTabsAction.ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'hideTabs',
    "Hidden"
)), toggled: ( ContextKeyExpr.equals('config.workbench.editor.showTabs', 'none')) }, group: '1_config', order: 30 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { submenu: MenuId.EditorTabsBarShowTabsZenModeSubmenu, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'tabBar',
    "Tab Bar"
)), group: '4_config', order: 10, when: InEditorZenModeContext });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsZenModeSubmenu, { command: { id: ZenShowMultipleEditorTabsAction.ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'multipleTabs',
    "Multiple Tabs"
)), toggled: ( ContextKeyExpr.equals('config.zenMode.showTabs', 'multiple')) }, group: '1_config', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsZenModeSubmenu, { command: { id: ZenShowSingleEditorTabAction.ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'singleTab',
    "Single Tab"
)), toggled: ( ContextKeyExpr.equals('config.zenMode.showTabs', 'single')) }, group: '1_config', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsZenModeSubmenu, { command: { id: ZenHideEditorTabsAction.ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'hideTabs',
    "Hidden"
)), toggled: ( ContextKeyExpr.equals('config.zenMode.showTabs', 'none')) }, group: '1_config', order: 30 });
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { submenu: MenuId.EditorActionsPositionSubmenu, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'editorActionsPosition',
    "Editor Actions Position"
)), group: '4_config', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EditorActionsPositionSubmenu, { command: { id: EditorActionsDefaultAction.ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'tabBar',
    "Tab Bar"
)), toggled: ( ContextKeyExpr.equals('config.workbench.editor.editorActionsLocation', 'default')) }, group: '1_config', order: 10, when: ( ( ContextKeyExpr.equals('config.workbench.editor.showTabs', 'none')).negate()) });
MenuRegistry.appendMenuItem(MenuId.EditorActionsPositionSubmenu, { command: { id: EditorActionsTitleBarAction.ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'titleBar',
    "Title Bar"
)), toggled: ( ContextKeyExpr.or(( ContextKeyExpr.equals('config.workbench.editor.editorActionsLocation', 'titleBar')), ( ContextKeyExpr.and(( ContextKeyExpr.equals('config.workbench.editor.showTabs', 'none')), ( ContextKeyExpr.equals('config.workbench.editor.editorActionsLocation', 'default')))))) }, group: '1_config', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EditorActionsPositionSubmenu, { command: { id: HideEditorActionsAction.ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'hidden',
    "Hidden"
)), toggled: ( ContextKeyExpr.equals('config.workbench.editor.editorActionsLocation', 'hidden')) }, group: '1_config', order: 30 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: CLOSE_EDITOR_COMMAND_ID, title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")) }, group: '1_close', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeOthers',
    "Close Others"
)), precondition: ( EditorGroupEditorsCountContext.notEqualsTo('1')) }, group: '1_close', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeRight',
    "Close to the Right"
)), precondition: ( ActiveEditorLastInGroupContext.toNegated()) }, group: '1_close', order: 30, when: EditorTabsVisibleContext });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: CLOSE_SAVED_EDITORS_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeAllSaved',
    "Close Saved"
)) }, group: '1_close', order: 40 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeAll',
    "Close All"
)) }, group: '1_close', order: 50 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: REOPEN_WITH_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'reopenWith',
    "Reopen Editor With..."
)) }, group: '1_open', order: 10, when: ActiveEditorAvailableEditorIdsContext });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: KEEP_EDITOR_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'keepOpen',
    "Keep Open"
)), precondition: ( ActiveEditorPinnedContext.toNegated()) }, group: '3_preview', order: 10, when: ( ContextKeyExpr.has('config.workbench.editor.enablePreview')) });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: PIN_EDITOR_COMMAND_ID, title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'pin', "Pin")) }, group: '3_preview', order: 20, when: ( ActiveEditorStickyContext.toNegated()) });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: UNPIN_EDITOR_COMMAND_ID, title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'unpin', "Unpin")) }, group: '3_preview', order: 20, when: ActiveEditorStickyContext });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR_UP, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitUp',
    "Split Up"
)) }, group: '5_split', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR_DOWN, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitDown',
    "Split Down"
)) }, group: '5_split', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR_LEFT, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitLeft',
    "Split Left"
)) }, group: '5_split', order: 30 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR_RIGHT, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitRight',
    "Split Right"
)) }, group: '5_split', order: 40 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR_IN_GROUP, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'splitInGroup',
    "Split in Group"
)) }, group: '6_split_in_group', order: 10, when: ActiveEditorCanSplitInGroupContext });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: JOIN_EDITOR_IN_GROUP, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'joinInGroup',
    "Join in Group"
)) }, group: '6_split_in_group', order: 10, when: SideBySideEditorActiveContext });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'moveToNewWindow',
    "Move into New Window"
)) }, group: '7_new_window', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'copyToNewWindow',
    "Copy into New Window"
)) }, group: '7_new_window', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_DIFF_SIDE_BY_SIDE, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'inlineView',
    "Inline View"
)), toggled: ( ContextKeyExpr.equals('config.diffEditor.renderSideBySide', false)) }, group: '1_diff', order: 10, when: ( ContextKeyExpr.has('isInDiffEditor')) });
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: SHOW_EDITORS_IN_GROUP, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'showOpenedEditors',
    "Show Opened Editors"
)) }, group: '3_open', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeAll',
    "Close All"
)) }, group: '5_close', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: CLOSE_SAVED_EDITORS_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeAllSaved',
    "Close Saved"
)) }, group: '5_close', order: 20 });
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_KEEP_EDITORS_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'togglePreviewMode',
    "Enable Preview Editors"
)), toggled: ( ContextKeyExpr.has('config.workbench.editor.enablePreview')) }, group: '7_settings', order: 10 });
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_MAXIMIZE_EDITOR_GROUP, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'maximizeGroup',
    "Maximize Group"
)) }, group: '8_group_operations', order: 5, when: ( ContextKeyExpr.and(( EditorPartMaximizedEditorGroupContext.negate()), EditorPartMultipleEditorGroupsContext)) });
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_MAXIMIZE_EDITOR_GROUP, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'unmaximizeGroup',
    "Unmaximize Group"
)) }, group: '8_group_operations', order: 5, when: EditorPartMaximizedEditorGroupContext });
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_LOCK_GROUP_COMMAND_ID, title: ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'lockGroup',
    "Lock Group"
)), toggled: ActiveEditorGroupLockedContext }, group: '8_group_operations', order: 10, when: ( IsAuxiliaryEditorPartContext.toNegated())  });
function appendEditorToolItem(primary, when, order, alternative, precondition) {
    const item = {
        command: {
            id: primary.id,
            title: primary.title,
            icon: primary.icon,
            toggled: primary.toggled,
            precondition
        },
        group: 'navigation',
        when,
        order
    };
    if (alternative) {
        item.alt = {
            id: alternative.id,
            title: alternative.title,
            icon: alternative.icon
        };
    }
    MenuRegistry.appendMenuItem(MenuId.EditorTitle, item);
}
const SPLIT_ORDER = 100000;
const CLOSE_ORDER = 1000000;
appendEditorToolItem({
    id: SPLIT_EDITOR,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'splitEditorRight',
        "Split Editor Right"
    )),
    icon: Codicon.splitHorizontal
}, ContextKeyExpr.not('splitEditorsVertically'), SPLIT_ORDER, {
    id: SPLIT_EDITOR_DOWN,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'splitEditorDown',
        "Split Editor Down"
    )),
    icon: Codicon.splitVertical
});
appendEditorToolItem({
    id: SPLIT_EDITOR,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'splitEditorDown',
        "Split Editor Down"
    )),
    icon: Codicon.splitVertical
}, ( ContextKeyExpr.has('splitEditorsVertically')), SPLIT_ORDER, {
    id: SPLIT_EDITOR_RIGHT,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'splitEditorRight',
        "Split Editor Right"
    )),
    icon: Codicon.splitHorizontal
});
appendEditorToolItem({
    id: TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'toggleSplitEditorInGroupLayout',
        "Toggle Layout"
    )),
    icon: Codicon.editorLayout
}, SideBySideEditorActiveContext, SPLIT_ORDER - 1);
appendEditorToolItem({
    id: CLOSE_EDITOR_COMMAND_ID,
    title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")),
    icon: Codicon.close
}, ( ContextKeyExpr.and(( EditorTabsVisibleContext.toNegated()), ( ActiveEditorDirtyContext.toNegated()), ( ActiveEditorStickyContext.toNegated()))), CLOSE_ORDER, {
    id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'closeAll',
        "Close All"
    )),
    icon: Codicon.closeAll
});
appendEditorToolItem({
    id: CLOSE_EDITOR_COMMAND_ID,
    title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")),
    icon: Codicon.closeDirty
}, ( ContextKeyExpr.and(( EditorTabsVisibleContext.toNegated()), ActiveEditorDirtyContext, ( ActiveEditorStickyContext.toNegated()))), CLOSE_ORDER, {
    id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'closeAll',
        "Close All"
    )),
    icon: Codicon.closeAll
});
appendEditorToolItem({
    id: UNPIN_EDITOR_COMMAND_ID,
    title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'unpin', "Unpin")),
    icon: Codicon.pinned
}, ( ContextKeyExpr.and(( EditorTabsVisibleContext.toNegated()), ( ActiveEditorDirtyContext.toNegated()), ActiveEditorStickyContext)), CLOSE_ORDER, {
    id: CLOSE_EDITOR_COMMAND_ID,
    title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")),
    icon: Codicon.close
});
appendEditorToolItem({
    id: UNPIN_EDITOR_COMMAND_ID,
    title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'unpin', "Unpin")),
    icon: Codicon.pinnedDirty
}, ( ContextKeyExpr.and(( EditorTabsVisibleContext.toNegated()), ActiveEditorDirtyContext, ActiveEditorStickyContext)), CLOSE_ORDER, {
    id: CLOSE_EDITOR_COMMAND_ID,
    title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")),
    icon: Codicon.close
});
appendEditorToolItem({
    id: LOCK_GROUP_COMMAND_ID,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'lockEditorGroup',
        "Lock Group"
    )),
    icon: Codicon.unlock
}, ( ContextKeyExpr.and(IsAuxiliaryEditorPartContext, ( ActiveEditorGroupLockedContext.toNegated()))), CLOSE_ORDER - 1);
appendEditorToolItem({
    id: UNLOCK_GROUP_COMMAND_ID,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'unlockEditorGroup',
        "Unlock Group"
    )),
    icon: Codicon.lock,
    toggled: ContextKeyExpr.true()
}, ActiveEditorGroupLockedContext, CLOSE_ORDER - 1);
const previousChangeIcon = registerIcon('diff-editor-previous-change', Codicon.arrowUp, ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'previousChangeIcon',
    'Icon for the previous change action in the diff editor.'
)));
appendEditorToolItem({
    id: GOTO_PREVIOUS_CHANGE,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'navigate.prev.label',
        "Previous Change"
    )),
    icon: previousChangeIcon
}, TextCompareEditorActiveContext, 10, undefined, EditorContextKeys.hasChanges);
const nextChangeIcon = registerIcon('diff-editor-next-change', Codicon.arrowDown, ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'nextChangeIcon',
    'Icon for the next change action in the diff editor.'
)));
appendEditorToolItem({
    id: GOTO_NEXT_CHANGE,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'navigate.next.label',
        "Next Change"
    )),
    icon: nextChangeIcon
}, TextCompareEditorActiveContext, 11, undefined, EditorContextKeys.hasChanges);
appendEditorToolItem({
    id: DIFF_SWAP_SIDES,
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'swapDiffSides',
        "Swap Left and Right Side"
    )),
    icon: Codicon.arrowSwap
}, ( ContextKeyExpr.and(TextCompareEditorActiveContext, ActiveCompareEditorCanSwapContext)), 15, undefined, undefined);
const toggleWhitespace = registerIcon('diff-editor-toggle-whitespace', Codicon.whitespace, ( localizeWithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'toggleWhitespace',
    'Icon for the toggle whitespace action in the diff editor.'
)));
MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
    command: {
        id: TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE,
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            'ignoreTrimWhitespace.label',
            "Show Leading/Trailing Whitespace Differences"
        )),
        icon: toggleWhitespace,
        precondition: TextCompareEditorActiveContext,
        toggled: ( ContextKeyExpr.equals('config.diffEditor.ignoreTrimWhitespace', false)),
    },
    group: 'navigation',
    when: TextCompareEditorActiveContext,
    order: 20,
});
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: KEEP_EDITOR_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'keepEditor',
    'Keep Editor'
)), category: Categories.View }, when: ( ContextKeyExpr.has('config.workbench.editor.enablePreview')) });
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: PIN_EDITOR_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'pinEditor',
    'Pin Editor'
)), category: Categories.View } });
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: UNPIN_EDITOR_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'unpinEditor',
    'Unpin Editor'
)), category: Categories.View } });
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_EDITOR_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeEditor',
    'Close Editor'
)), category: Categories.View } });
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_PINNED_EDITOR_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closePinnedEditor',
    'Close Pinned Editor'
)), category: Categories.View } });
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeEditorsInGroup',
    'Close All Editors in Group'
)), category: Categories.View } });
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_SAVED_EDITORS_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeSavedEditors',
    'Close Saved Editors in Group'
)), category: Categories.View } });
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeOtherEditors',
    'Close Other Editors in Group'
)), category: Categories.View } });
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeRightEditors',
    'Close Editors to the Right in Group'
)), category: Categories.View }, when: ( ActiveEditorLastInGroupContext.toNegated()) });
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_EDITORS_AND_GROUP_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'closeEditorGroup',
    'Close Editor Group'
)), category: Categories.View }, when: MultipleEditorGroupsContext });
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: REOPEN_WITH_COMMAND_ID, title: ( localize2WithPath(
    'vs/workbench/browser/parts/editor/editor.contribution',
    'reopenWith',
    "Reopen Editor With..."
)), category: Categories.View }, when: ActiveEditorAvailableEditorIdsContext });
MenuRegistry.appendMenuItem(MenuId.MenubarRecentMenu, {
    group: '1_editor',
    command: {
        id: ReopenClosedEditorAction.ID,
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miReopenClosedEditor', comment: ['&& denotes a mnemonic'] },
            "&&Reopen Closed Editor"
        )),
        precondition: ( ContextKeyExpr.has('canReopenClosedEditor'))
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarRecentMenu, {
    group: 'z_clear',
    command: {
        id: ClearRecentFilesAction.ID,
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miClearRecentOpen', comment: ['&& denotes a mnemonic'] },
            "&&Clear Recently Opened..."
        ))
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        'miShare',
        "Share"
    )),
    submenu: MenuId.MenubarShare,
    group: '45_share',
    order: 1,
});
MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
    group: '2_appearance',
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        { key: 'miEditorLayout', comment: ['&& denotes a mnemonic'] },
        "Editor &&Layout"
    )),
    submenu: MenuId.MenubarLayoutMenu,
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '1_split',
    command: {
        id: SPLIT_EDITOR_UP,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miSplitEditorUpWithoutMnemonic',
                "Split Up"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miSplitEditorUp', comment: ['&& denotes a mnemonic'] },
                "Split &&Up"
            )),
        }
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '1_split',
    command: {
        id: SPLIT_EDITOR_DOWN,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miSplitEditorDownWithoutMnemonic',
                "Split Down"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miSplitEditorDown', comment: ['&& denotes a mnemonic'] },
                "Split &&Down"
            )),
        }
    },
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '1_split',
    command: {
        id: SPLIT_EDITOR_LEFT,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miSplitEditorLeftWithoutMnemonic',
                "Split Left"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miSplitEditorLeft', comment: ['&& denotes a mnemonic'] },
                "Split &&Left"
            )),
        }
    },
    order: 3
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '1_split',
    command: {
        id: SPLIT_EDITOR_RIGHT,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miSplitEditorRightWithoutMnemonic',
                "Split Right"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miSplitEditorRight', comment: ['&& denotes a mnemonic'] },
                "Split &&Right"
            )),
        }
    },
    order: 4
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '2_split_in_group',
    command: {
        id: SPLIT_EDITOR_IN_GROUP,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miSplitEditorInGroupWithoutMnemonic',
                "Split in Group"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miSplitEditorInGroup', comment: ['&& denotes a mnemonic'] },
                "Split in &&Group"
            )),
        }
    },
    when: ActiveEditorCanSplitInGroupContext,
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '2_split_in_group',
    command: {
        id: JOIN_EDITOR_IN_GROUP,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miJoinEditorInGroupWithoutMnemonic',
                "Join in Group"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miJoinEditorInGroup', comment: ['&& denotes a mnemonic'] },
                "Join in &&Group"
            )),
        }
    },
    when: SideBySideEditorActiveContext,
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '3_new_window',
    command: {
        id: MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'moveEditorToNewWindow',
                "Move Editor into New Window"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miMoveEditorToNewWindow', comment: ['&& denotes a mnemonic'] },
                "&&Move Editor into New Window"
            )),
        }
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '3_new_window',
    command: {
        id: COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'copyEditorToNewWindow',
                "Copy Editor into New Window"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miCopyEditorToNewWindow', comment: ['&& denotes a mnemonic'] },
                "&&Copy Editor into New Window"
            )),
        }
    },
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '4_layouts',
    command: {
        id: EditorLayoutSingleAction.ID,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miSingleColumnEditorLayoutWithoutMnemonic',
                "Single"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miSingleColumnEditorLayout', comment: ['&& denotes a mnemonic'] },
                "&&Single"
            )),
        }
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '4_layouts',
    command: {
        id: EditorLayoutTwoColumnsAction.ID,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miTwoColumnsEditorLayoutWithoutMnemonic',
                "Two Columns"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miTwoColumnsEditorLayout', comment: ['&& denotes a mnemonic'] },
                "&&Two Columns"
            )),
        }
    },
    order: 3
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '4_layouts',
    command: {
        id: EditorLayoutThreeColumnsAction.ID,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miThreeColumnsEditorLayoutWithoutMnemonic',
                "Three Columns"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miThreeColumnsEditorLayout', comment: ['&& denotes a mnemonic'] },
                "T&&hree Columns"
            )),
        }
    },
    order: 4
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '4_layouts',
    command: {
        id: EditorLayoutTwoRowsAction.ID,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miTwoRowsEditorLayoutWithoutMnemonic',
                "Two Rows"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miTwoRowsEditorLayout', comment: ['&& denotes a mnemonic'] },
                "T&&wo Rows"
            )),
        }
    },
    order: 5
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '4_layouts',
    command: {
        id: EditorLayoutThreeRowsAction.ID,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miThreeRowsEditorLayoutWithoutMnemonic',
                "Three Rows"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miThreeRowsEditorLayout', comment: ['&& denotes a mnemonic'] },
                "Three &&Rows"
            )),
        }
    },
    order: 6
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '4_layouts',
    command: {
        id: EditorLayoutTwoByTwoGridAction.ID,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miTwoByTwoGridEditorLayoutWithoutMnemonic',
                "Grid (2x2)"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miTwoByTwoGridEditorLayout', comment: ['&& denotes a mnemonic'] },
                "&&Grid (2x2)"
            )),
        }
    },
    order: 7
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '4_layouts',
    command: {
        id: EditorLayoutTwoRowsRightAction.ID,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miTwoRowsRightEditorLayoutWithoutMnemonic',
                "Two Rows Right"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miTwoRowsRightEditorLayout', comment: ['&& denotes a mnemonic'] },
                "Two R&&ows Right"
            )),
        }
    },
    order: 8
});
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
    group: '4_layouts',
    command: {
        id: EditorLayoutTwoColumnsBottomAction.ID,
        title: {
            ...( localize2WithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                'miTwoColumnsBottomEditorLayoutWithoutMnemonic',
                "Two Columns Bottom"
            )),
            mnemonicTitle: ( localizeWithPath(
                'vs/workbench/browser/parts/editor/editor.contribution',
                { key: 'miTwoColumnsBottomEditorLayout', comment: ['&& denotes a mnemonic'] },
                "Two &&Columns Bottom"
            )),
        }
    },
    order: 9
});
MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
    group: '1_history_nav',
    command: {
        id: 'workbench.action.navigateToLastEditLocation',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miLastEditLocation', comment: ['&& denotes a mnemonic'] },
            "&&Last Edit Location"
        )),
        precondition: ( ContextKeyExpr.has('canNavigateToLastEditLocation'))
    },
    order: 3
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
    group: '1_sideBySide',
    command: {
        id: FOCUS_FIRST_SIDE_EDITOR,
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miFirstSideEditor', comment: ['&& denotes a mnemonic'] },
            "&&First Side in Editor"
        ))
    },
    when: ( ContextKeyExpr.or(SideBySideEditorActiveContext, TextCompareEditorActiveContext)),
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
    group: '1_sideBySide',
    command: {
        id: FOCUS_SECOND_SIDE_EDITOR,
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miSecondSideEditor', comment: ['&& denotes a mnemonic'] },
            "&&Second Side in Editor"
        ))
    },
    when: ( ContextKeyExpr.or(SideBySideEditorActiveContext, TextCompareEditorActiveContext)),
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
    group: '2_any',
    command: {
        id: 'workbench.action.nextEditor',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miNextEditor', comment: ['&& denotes a mnemonic'] },
            "&&Next Editor"
        ))
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
    group: '2_any',
    command: {
        id: 'workbench.action.previousEditor',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miPreviousEditor', comment: ['&& denotes a mnemonic'] },
            "&&Previous Editor"
        ))
    },
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
    group: '3_any_used',
    command: {
        id: 'workbench.action.openNextRecentlyUsedEditor',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miNextRecentlyUsedEditor', comment: ['&& denotes a mnemonic'] },
            "&&Next Used Editor"
        ))
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
    group: '3_any_used',
    command: {
        id: 'workbench.action.openPreviousRecentlyUsedEditor',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miPreviousRecentlyUsedEditor', comment: ['&& denotes a mnemonic'] },
            "&&Previous Used Editor"
        ))
    },
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
    group: '4_group',
    command: {
        id: 'workbench.action.nextEditorInGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miNextEditorInGroup', comment: ['&& denotes a mnemonic'] },
            "&&Next Editor in Group"
        ))
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
    group: '4_group',
    command: {
        id: 'workbench.action.previousEditorInGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miPreviousEditorInGroup', comment: ['&& denotes a mnemonic'] },
            "&&Previous Editor in Group"
        ))
    },
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
    group: '5_group_used',
    command: {
        id: 'workbench.action.openNextRecentlyUsedEditorInGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miNextUsedEditorInGroup', comment: ['&& denotes a mnemonic'] },
            "&&Next Used Editor in Group"
        ))
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
    group: '5_group_used',
    command: {
        id: 'workbench.action.openPreviousRecentlyUsedEditorInGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miPreviousUsedEditorInGroup', comment: ['&& denotes a mnemonic'] },
            "&&Previous Used Editor in Group"
        ))
    },
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
    group: '2_editor_nav',
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        { key: 'miSwitchEditor', comment: ['&& denotes a mnemonic'] },
        "Switch &&Editor"
    )),
    submenu: MenuId.MenubarSwitchEditorMenu,
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '1_focus_index',
    command: {
        id: 'workbench.action.focusFirstEditorGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miFocusFirstGroup', comment: ['&& denotes a mnemonic'] },
            "Group &&1"
        ))
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '1_focus_index',
    command: {
        id: 'workbench.action.focusSecondEditorGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miFocusSecondGroup', comment: ['&& denotes a mnemonic'] },
            "Group &&2"
        ))
    },
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '1_focus_index',
    command: {
        id: 'workbench.action.focusThirdEditorGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miFocusThirdGroup', comment: ['&& denotes a mnemonic'] },
            "Group &&3"
        )),
        precondition: MultipleEditorGroupsContext
    },
    order: 3
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '1_focus_index',
    command: {
        id: 'workbench.action.focusFourthEditorGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miFocusFourthGroup', comment: ['&& denotes a mnemonic'] },
            "Group &&4"
        )),
        precondition: MultipleEditorGroupsContext
    },
    order: 4
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '1_focus_index',
    command: {
        id: 'workbench.action.focusFifthEditorGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miFocusFifthGroup', comment: ['&& denotes a mnemonic'] },
            "Group &&5"
        )),
        precondition: MultipleEditorGroupsContext
    },
    order: 5
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '2_next_prev',
    command: {
        id: 'workbench.action.focusNextGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miNextGroup', comment: ['&& denotes a mnemonic'] },
            "&&Next Group"
        )),
        precondition: MultipleEditorGroupsContext
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '2_next_prev',
    command: {
        id: 'workbench.action.focusPreviousGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miPreviousGroup', comment: ['&& denotes a mnemonic'] },
            "&&Previous Group"
        )),
        precondition: MultipleEditorGroupsContext
    },
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '3_directional',
    command: {
        id: 'workbench.action.focusLeftGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miFocusLeftGroup', comment: ['&& denotes a mnemonic'] },
            "Group &&Left"
        )),
        precondition: MultipleEditorGroupsContext
    },
    order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '3_directional',
    command: {
        id: 'workbench.action.focusRightGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miFocusRightGroup', comment: ['&& denotes a mnemonic'] },
            "Group &&Right"
        )),
        precondition: MultipleEditorGroupsContext
    },
    order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '3_directional',
    command: {
        id: 'workbench.action.focusAboveGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miFocusAboveGroup', comment: ['&& denotes a mnemonic'] },
            "Group &&Above"
        )),
        precondition: MultipleEditorGroupsContext
    },
    order: 3
});
MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
    group: '3_directional',
    command: {
        id: 'workbench.action.focusBelowGroup',
        title: ( localizeWithPath(
            'vs/workbench/browser/parts/editor/editor.contribution',
            { key: 'miFocusBelowGroup', comment: ['&& denotes a mnemonic'] },
            "Group &&Below"
        )),
        precondition: MultipleEditorGroupsContext
    },
    order: 4
});
MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
    group: '2_editor_nav',
    title: ( localizeWithPath(
        'vs/workbench/browser/parts/editor/editor.contribution',
        { key: 'miSwitchGroup', comment: ['&& denotes a mnemonic'] },
        "Switch &&Group"
    )),
    submenu: MenuId.MenubarSwitchGroupMenu,
    order: 2
});
