mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-05 21:07:16 +01:00
committed by
GitHub
parent
5eb1fa7595
commit
c343e8600a
@@ -41,7 +41,7 @@ import {
|
||||
ReOpenInTextEditorAction, DuplicateGroupDownAction, DuplicateGroupLeftAction, DuplicateGroupRightAction, DuplicateGroupUpAction, ToggleEditorTypeAction, SplitEditorToAboveGroupAction, SplitEditorToBelowGroupAction,
|
||||
SplitEditorToFirstGroupAction, SplitEditorToLastGroupAction, SplitEditorToLeftGroupAction, SplitEditorToNextGroupAction, SplitEditorToPreviousGroupAction, SplitEditorToRightGroupAction, NavigateForwardInEditsAction,
|
||||
NavigateBackwardsInEditsAction, NavigateForwardInNavigationsAction, NavigateBackwardsInNavigationsAction, NavigatePreviousInNavigationsAction, NavigatePreviousInEditsAction, NavigateToLastNavigationLocationAction,
|
||||
MaximizeGroupHideSidebarAction, ExperimentalMoveEditorIntoNewWindowAction, ToggleMaximizeEditorGroupAction
|
||||
MaximizeGroupHideSidebarAction, ExperimentalMoveEditorIntoNewWindowAction, ToggleMaximizeEditorGroupAction, MinimizeOtherGroupsHideSidebarAction
|
||||
} from 'vs/workbench/browser/parts/editor/editorActions';
|
||||
import {
|
||||
CLOSE_EDITORS_AND_GROUP_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_EDITOR_GROUP_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,
|
||||
@@ -217,6 +217,7 @@ registerAction2(ToggleGroupSizesAction);
|
||||
registerAction2(MaximizeGroupHideSidebarAction);
|
||||
registerAction2(ToggleMaximizeEditorGroupAction);
|
||||
registerAction2(MinimizeOtherGroupsAction);
|
||||
registerAction2(MinimizeOtherGroupsHideSidebarAction);
|
||||
|
||||
registerAction2(MoveEditorLeftInGroupAction);
|
||||
registerAction2(MoveEditorRightInGroupAction);
|
||||
|
||||
@@ -33,7 +33,7 @@ import { KeyChord, KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { Categories } from 'vs/platform/action/common/actionCommonCategories';
|
||||
import { ActiveEditorAvailableEditorIdsContext, ActiveEditorContext, ActiveEditorGroupEmptyContext, EditorPartMaximizedEditorGroupContext, EditorPartMultipleEditorGroupsContext } from 'vs/workbench/common/contextkeys';
|
||||
import { ActiveEditorAvailableEditorIdsContext, ActiveEditorContext, ActiveEditorGroupEmptyContext, AuxiliaryBarVisibleContext, EditorPartMaximizedEditorGroupContext, EditorPartMultipleEditorGroupsContext, MultipleEditorGroupsContext, SideBarVisibleContext } from 'vs/workbench/common/contextkeys';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { getActiveDocument } from 'vs/base/browser/dom';
|
||||
|
||||
@@ -1017,7 +1017,8 @@ export class MinimizeOtherGroupsAction extends Action2 {
|
||||
id: 'workbench.action.minimizeOtherEditors',
|
||||
title: { value: localize('minimizeOtherEditorGroups', "Expand Editor Group"), original: 'Expand Editor Group' },
|
||||
f1: true,
|
||||
category: Categories.View
|
||||
category: Categories.View,
|
||||
precondition: MultipleEditorGroupsContext
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1028,6 +1029,28 @@ export class MinimizeOtherGroupsAction extends Action2 {
|
||||
}
|
||||
}
|
||||
|
||||
export class MinimizeOtherGroupsHideSidebarAction extends Action2 {
|
||||
|
||||
constructor() {
|
||||
super({
|
||||
id: 'workbench.action.minimizeOtherEditorsHideSidebar',
|
||||
title: { value: localize('minimizeOtherEditorGroupsHideSidebar', "Expand Editor Group and Hide Side Bars"), original: 'Expand Editor Group and Hide Side Bars' },
|
||||
f1: true,
|
||||
category: Categories.View,
|
||||
precondition: ContextKeyExpr.or(MultipleEditorGroupsContext, SideBarVisibleContext, AuxiliaryBarVisibleContext)
|
||||
});
|
||||
}
|
||||
|
||||
override async run(accessor: ServicesAccessor): Promise<void> {
|
||||
const editorGroupService = accessor.get(IEditorGroupsService);
|
||||
const layoutService = accessor.get(IWorkbenchLayoutService);
|
||||
|
||||
layoutService.setPartHidden(true, Parts.SIDEBAR_PART);
|
||||
layoutService.setPartHidden(true, Parts.AUXILIARYBAR_PART);
|
||||
editorGroupService.arrangeGroups(GroupsArrangement.EXPAND);
|
||||
}
|
||||
}
|
||||
|
||||
export class ResetGroupSizesAction extends Action2 {
|
||||
|
||||
constructor() {
|
||||
@@ -1073,7 +1096,7 @@ export class MaximizeGroupHideSidebarAction extends Action2 {
|
||||
title: { value: localize('maximizeEditorHideSidebar', "Maximize Editor Group and Hide Side Bars"), original: 'Maximize Editor Group and Hide Side Bars' },
|
||||
f1: true,
|
||||
category: Categories.View,
|
||||
precondition: ContextKeyExpr.and(EditorPartMaximizedEditorGroupContext.negate(), EditorPartMultipleEditorGroupsContext)
|
||||
precondition: ContextKeyExpr.or(ContextKeyExpr.and(EditorPartMaximizedEditorGroupContext.negate(), EditorPartMultipleEditorGroupsContext), SideBarVisibleContext, AuxiliaryBarVisibleContext)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user