Skip to content

Commit a4e0d1f

Browse files
authored
Candidate/142146 (microsoft#142424)
* refs microsoft#142146 * refs microsoft#142146
1 parent 22fb1cf commit a4e0d1f

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/vs/workbench/browser/actions/layoutActions.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,13 +903,16 @@ abstract class BaseResizeViewAction extends Action2 {
903903
const isEditorFocus = layoutService.hasFocus(Parts.EDITOR_PART);
904904
const isSidebarFocus = layoutService.hasFocus(Parts.SIDEBAR_PART);
905905
const isPanelFocus = layoutService.hasFocus(Parts.PANEL_PART);
906+
const isAuxiliaryBarFocus = layoutService.hasFocus(Parts.AUXILIARYBAR_PART);
906907

907908
if (isSidebarFocus) {
908909
part = Parts.SIDEBAR_PART;
909910
} else if (isPanelFocus) {
910911
part = Parts.PANEL_PART;
911912
} else if (isEditorFocus) {
912913
part = Parts.EDITOR_PART;
914+
} else if (isAuxiliaryBarFocus) {
915+
part = Parts.AUXILIARYBAR_PART;
913916
}
914917
} else {
915918
part = partToResize;

src/vs/workbench/browser/actions/navigationActions.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ abstract class BaseNavigationAction extends Action {
3535
const isEditorFocus = this.layoutService.hasFocus(Parts.EDITOR_PART);
3636
const isPanelFocus = this.layoutService.hasFocus(Parts.PANEL_PART);
3737
const isSidebarFocus = this.layoutService.hasFocus(Parts.SIDEBAR_PART);
38+
const isAuxiliaryBarFocus = this.layoutService.hasFocus(Parts.AUXILIARYBAR_PART);
3839

3940
let neighborPart: Parts | undefined;
4041
if (isEditorFocus) {
@@ -54,6 +55,10 @@ abstract class BaseNavigationAction extends Action {
5455
neighborPart = this.layoutService.getVisibleNeighborPart(Parts.SIDEBAR_PART, this.direction);
5556
}
5657

58+
if (isAuxiliaryBarFocus) {
59+
neighborPart = neighborPart = this.layoutService.getVisibleNeighborPart(Parts.AUXILIARYBAR_PART, this.direction);
60+
}
61+
5762
if (neighborPart === Parts.EDITOR_PART) {
5863
if (!this.navigateBackToEditorGroup(this.toGroupDirection(this.direction))) {
5964
this.navigateToEditorGroup(this.direction === Direction.Right ? GroupLocation.FIRST : GroupLocation.LAST);
@@ -62,6 +67,8 @@ abstract class BaseNavigationAction extends Action {
6267
this.navigateToSidebar();
6368
} else if (neighborPart === Parts.PANEL_PART) {
6469
this.navigateToPanel();
70+
} else if (neighborPart === Parts.AUXILIARYBAR_PART) {
71+
this.navigateToAuxiliaryBar();
6572
}
6673
}
6774

@@ -100,6 +107,26 @@ abstract class BaseNavigationAction extends Action {
100107
return !!viewlet;
101108
}
102109

110+
private async navigateToAuxiliaryBar(): Promise<IComposite | boolean> {
111+
if (!this.layoutService.isVisible(Parts.AUXILIARYBAR_PART)) {
112+
return false;
113+
}
114+
115+
const activePanel = this.paneCompositeService.getActivePaneComposite(ViewContainerLocation.AuxiliaryBar);
116+
if (!activePanel) {
117+
return false;
118+
}
119+
120+
const activePanelId = activePanel.getId();
121+
122+
const res = await this.paneCompositeService.openPaneComposite(activePanelId, ViewContainerLocation.AuxiliaryBar, true);
123+
if (!res) {
124+
return false;
125+
}
126+
127+
return res;
128+
}
129+
103130
private navigateAcrossEditorGroup(direction: GroupDirection): boolean {
104131
return this.doNavigateToEditorGroup({ direction });
105132
}

0 commit comments

Comments
 (0)