From 8d5ab9ca9692edd7f4f1fddc66acedc04f86be79 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 15 Jul 2016 11:26:25 +0200 Subject: [PATCH] add flag to showTabsOverflowAction --- .../workbench/browser/parts/editor/titleControl.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index 6c7ff173d30..8dd9895bcc0 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -53,6 +53,8 @@ export interface ITitleAreaControl { dispose(): void; } +const showTabsOverflowAction = false; // TODO@Ben temporary + export abstract class TitleControl implements ITitleAreaControl { private static draggedEditor: IEditorIdentifier; @@ -226,6 +228,8 @@ export abstract class TitleControl implements ITitleAreaControl { this.pinEditorAction = this.instantiationService.createInstance(KeepEditorAction, KeepEditorAction.ID, nls.localize('keepOpen', "Keep Open")); this.showEditorsInGroupAction = this.instantiationService.createInstance(ShowEditorsInGroupAction, ShowEditorsInGroupAction.ID, nls.localize('showOpenedEditors', "Show Opened Editors")); this.splitEditorAction = this.instantiationService.createInstance(SplitEditorAction, SplitEditorAction.ID, SplitEditorAction.LABEL); + + this.showEditorsInGroupAction.class = 'show-group-editors-action'; } protected createEditorActionsToolBar(container: HTMLElement): void { @@ -367,9 +371,15 @@ export abstract class TitleControl implements ITitleAreaControl { secondaryEditorActions = prepareActions(editorActions.secondary); } + if (this.showTabs && showTabsOverflowAction) { + primaryEditorActions.push(this.showEditorsInGroupAction); + } + if (this.showTabs) { - secondaryEditorActions.push(new Separator()); - secondaryEditorActions.push(this.showEditorsInGroupAction); + if (!showTabsOverflowAction) { + secondaryEditorActions.push(new Separator()); + secondaryEditorActions.push(this.showEditorsInGroupAction); + } secondaryEditorActions.push(new Separator()); secondaryEditorActions.push(this.closeEditorsInGroupAction); } -- GitLab