Skip to content

Commit 7d4091a

Browse files
author
Benjamin Pasero
authored
aux window 💄 (#198445)
1 parent 6c8fd34 commit 7d4091a

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { GroupIdentifier, IWorkbenchEditorConfiguration, IEditorIdentifier, IEditorCloseEvent, IEditorPartOptions, IEditorPartOptionsChangeEvent, SideBySideEditor, EditorCloseContext, IEditorPane, IEditorPartLimitOptions, IEditorPartDecorationOptions } from 'vs/workbench/common/editor';
77
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
8-
import { IEditorGroup, GroupDirection, IMergeGroupOptions, GroupsOrder, GroupsArrangement } from 'vs/workbench/services/editor/common/editorGroupsService';
8+
import { IEditorGroup, GroupDirection, IMergeGroupOptions, GroupsOrder, GroupsArrangement, IAuxiliaryEditorPart } from 'vs/workbench/services/editor/common/editorGroupsService';
99
import { IDisposable } from 'vs/base/common/lifecycle';
1010
import { Dimension } from 'vs/base/browser/dom';
1111
import { Event } from 'vs/base/common/event';
@@ -18,6 +18,7 @@ import { IEditorOptions } from 'vs/platform/editor/common/editor';
1818
import { IWindowsConfiguration } from 'vs/platform/window/common/window';
1919
import { BooleanVerifier, EnumVerifier, NumberVerifier, ObjectVerifier, SetVerifier, verifyObject } from 'vs/base/common/verifier';
2020
import product from 'vs/platform/product/common/product';
21+
import { IAuxiliaryWindowOpenOptions } from 'vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService';
2122

2223
export interface IEditorPartCreationOptions {
2324
readonly restorePreviousState: boolean;
@@ -179,6 +180,10 @@ export interface IEditorPartsView {
179180
readonly activeGroup: IEditorGroupView;
180181
readonly groups: IEditorGroupView[];
181182
getGroup(identifier: GroupIdentifier): IEditorGroupView | undefined;
183+
184+
readonly count: number;
185+
186+
createAuxiliaryEditorPart(options?: IAuxiliaryWindowOpenOptions): Promise<IAuxiliaryEditorPart>;
182187
}
183188

184189
/**

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { IEditorResolverService } from 'vs/workbench/services/editor/common/edit
4040
import { IEditorTitleControlDimensions } from 'vs/workbench/browser/parts/editor/editorTitleControl';
4141
import { IReadonlyEditorGroupModel } from 'vs/workbench/common/editor/editorGroupModel';
4242
import { EDITOR_CORE_NAVIGATION_COMMANDS } from 'vs/workbench/browser/parts/editor/editorCommands';
43-
import { IAuxiliaryEditorPart, IEditorGroupsService, MergeGroupMode } from 'vs/workbench/services/editor/common/editorGroupsService';
43+
import { IAuxiliaryEditorPart, MergeGroupMode } from 'vs/workbench/services/editor/common/editorGroupsService';
4444
import { isMacintosh } from 'vs/base/common/platform';
4545
import { IHostService } from 'vs/workbench/services/host/browser/host';
4646

@@ -133,7 +133,6 @@ export abstract class EditorTabsControl extends Themable implements IEditorTabsC
133133
@IQuickInputService protected quickInputService: IQuickInputService,
134134
@IThemeService themeService: IThemeService,
135135
@IEditorResolverService private readonly editorResolverService: IEditorResolverService,
136-
@IEditorGroupsService protected readonly editorGroupService: IEditorGroupsService,
137136
@IHostService private readonly hostService: IHostService
138137
) {
139138
super(themeService);
@@ -356,7 +355,7 @@ export abstract class EditorTabsControl extends Themable implements IEditorTabsC
356355
}
357356
}
358357

359-
return this.editorGroupService.createAuxiliaryEditorPart({ bounds });
358+
return this.editorPartsView.createAuxiliaryEditorPart({ bounds });
360359
}
361360

362361
protected isNewWindowOperation(e: DragEvent): boolean {

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { activeContrastBorder, contrastBorder, editorBackground } from 'vs/platf
3131
import { ResourcesDropHandler, DraggedEditorIdentifier, DraggedEditorGroupIdentifier, extractTreeDropData, isWindowDraggedOver } from 'vs/workbench/browser/dnd';
3232
import { Color } from 'vs/base/common/color';
3333
import { INotificationService } from 'vs/platform/notification/common/notification';
34-
import { MergeGroupMode, IMergeGroupOptions, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
34+
import { MergeGroupMode, IMergeGroupOptions } from 'vs/workbench/services/editor/common/editorGroupsService';
3535
import { addDisposableListener, EventType, EventHelper, Dimension, scheduleAtNextAnimationFrame, findParentWithClass, clearNode, DragAndDropObserver, isMouseEvent, getWindow, runWhenWindowIdle } from 'vs/base/browser/dom';
3636
import { localize } from 'vs/nls';
3737
import { IEditorGroupsView, EditorServiceImpl, IEditorGroupView, IInternalEditorOpenOptions, IEditorPartsView } from 'vs/workbench/browser/parts/editor/editor';
@@ -148,13 +148,12 @@ export class MultiEditorTabsControl extends EditorTabsControl {
148148
@IThemeService themeService: IThemeService,
149149
@IEditorService private readonly editorService: EditorServiceImpl,
150150
@IPathService private readonly pathService: IPathService,
151-
@IEditorGroupsService editorGroupService: IEditorGroupsService,
152151
@ITreeViewsDnDService private readonly treeViewsDragAndDropService: ITreeViewsDnDService,
153152
@IEditorResolverService editorResolverService: IEditorResolverService,
154153
@ILifecycleService private readonly lifecycleService: ILifecycleService,
155154
@IHostService hostService: IHostService
156155
) {
157-
super(parent, editorPartsView, groupsView, groupView, tabsModel, contextMenuService, instantiationService, contextKeyService, keybindingService, notificationService, quickInputService, themeService, editorResolverService, editorGroupService, hostService);
156+
super(parent, editorPartsView, groupsView, groupView, tabsModel, contextMenuService, instantiationService, contextKeyService, keybindingService, notificationService, quickInputService, themeService, editorResolverService, hostService);
158157

159158
// Resolve the correct path library for the OS we are on
160159
// If we are connected to remote, this accounts for the
@@ -1211,7 +1210,7 @@ export class MultiEditorTabsControl extends EditorTabsControl {
12111210
description: editor.getDescription(verbosity),
12121211
forceDescription: editor.hasCapability(EditorInputCapabilities.ForceDescription),
12131212
title: editor.getTitle(Verbosity.LONG),
1214-
ariaLabel: computeEditorAriaLabel(editor, tabIndex, this.groupView, this.editorGroupService.count)
1213+
ariaLabel: computeEditorAriaLabel(editor, tabIndex, this.groupView, this.editorPartsView.count)
12151214
});
12161215

12171216
if (editor === this.tabsModel.activeEditor) {

0 commit comments

Comments
 (0)