@codingame/monaco-vscode-view-common-service-override 11.1.2 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +3 -1
- package/index.js +110 -1
- package/package.json +64 -10
- package/service-override/tools/editorAssets.d.ts +1 -0
- package/service-override/tools/editorAssets.js +5 -0
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.d.ts +21 -0
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.js +2 -0
- package/vscode/src/vs/platform/webview/common/mimeTypes.d.ts +2 -0
- package/vscode/src/vs/platform/webview/common/mimeTypes.js +1 -0
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.d.ts +18 -0
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +1 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.d.ts +7 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +116 -115
- package/vscode/src/vs/workbench/browser/actions/listCommands.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +120 -125
- package/vscode/src/vs/workbench/browser/actions/navigationActions.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +81 -74
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -250
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.d.ts +21 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +26 -25
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.d.ts +32 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +10 -8
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +58 -64
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +48 -38
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +19 -40
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +7 -5
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +6 -4
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +6 -4
- package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +16 -16
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +15 -10
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +27 -25
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +4 -2
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +6 -386
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +385 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.d.ts +105 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +50 -62
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +16 -15
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +15 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +15 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +3 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +37 -39
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +22 -21
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +3 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.d.ts +117 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +57 -53
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +27 -25
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +15 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +4 -3
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +28 -28
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -5
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.js +2 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +54 -56
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +48 -38
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +19 -30
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +3 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +139 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +58 -56
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +4 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +2 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +28 -28
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +3 -2
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +15 -13
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +10 -8
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.d.ts +6 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +3 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +60 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +64 -63
- package/vscode/src/vs/workbench/services/history/browser/historyService.d.ts +184 -0
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +154 -148
- package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +1 -1
- package/vscode/src/vs/workbench/services/progress/browser/progressService.d.ts +36 -0
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +59 -54
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.d.ts +34 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +4 -3
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +71 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +122 -0
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +86 -90
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.d.ts +80 -0
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +58 -64
- package/override/vs/workbench/browser/parts/editor/textEditor.js +0 -5
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
- package/tools/editorAssets.js +0 -4
- package/tools/url.js +0 -10
- package/viewCommon.js +0 -109
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
|
|
1
2
|
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
3
|
+
import { GroupLocation, GroupDirection } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
2
4
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
5
|
+
import { Parts } from '@codingame/monaco-vscode-e571cbbb-526b-5d8b-92c5-a0437d2dabb3-common/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
3
6
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
4
7
|
import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
5
8
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
9
|
+
import { Direction } from '@codingame/monaco-vscode-6980eeab-47bb-5a48-8e15-32caf0785565-common/vscode/vs/base/browser/ui/grid/grid';
|
|
10
|
+
import { KeyCode, KeyMod } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
6
11
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
7
12
|
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
|
|
13
|
+
import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
14
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
8
15
|
import { getActiveWindow } from 'vscode/vscode/vs/base/browser/dom';
|
|
9
16
|
import { isAuxiliaryWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
10
17
|
|
|
@@ -17,79 +24,79 @@ class BaseNavigationAction extends Action2 {
|
|
|
17
24
|
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
18
25
|
const editorGroupService = accessor.get(IEditorGroupsService);
|
|
19
26
|
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
20
|
-
const isEditorFocus = layoutService.hasFocus(
|
|
21
|
-
const isPanelFocus = layoutService.hasFocus(
|
|
22
|
-
const isSidebarFocus = layoutService.hasFocus(
|
|
23
|
-
const isAuxiliaryBarFocus = layoutService.hasFocus(
|
|
27
|
+
const isEditorFocus = layoutService.hasFocus(Parts.EDITOR_PART);
|
|
28
|
+
const isPanelFocus = layoutService.hasFocus(Parts.PANEL_PART);
|
|
29
|
+
const isSidebarFocus = layoutService.hasFocus(Parts.SIDEBAR_PART);
|
|
30
|
+
const isAuxiliaryBarFocus = layoutService.hasFocus(Parts.AUXILIARYBAR_PART);
|
|
24
31
|
let neighborPart;
|
|
25
32
|
if (isEditorFocus) {
|
|
26
33
|
const didNavigate = this.navigateAcrossEditorGroup(this.toGroupDirection(this.direction), editorGroupService);
|
|
27
34
|
if (didNavigate) {
|
|
28
35
|
return;
|
|
29
36
|
}
|
|
30
|
-
neighborPart = layoutService.getVisibleNeighborPart(
|
|
37
|
+
neighborPart = layoutService.getVisibleNeighborPart(Parts.EDITOR_PART, this.direction);
|
|
31
38
|
}
|
|
32
39
|
if (isPanelFocus) {
|
|
33
|
-
neighborPart = layoutService.getVisibleNeighborPart(
|
|
40
|
+
neighborPart = layoutService.getVisibleNeighborPart(Parts.PANEL_PART, this.direction);
|
|
34
41
|
}
|
|
35
42
|
if (isSidebarFocus) {
|
|
36
|
-
neighborPart = layoutService.getVisibleNeighborPart(
|
|
43
|
+
neighborPart = layoutService.getVisibleNeighborPart(Parts.SIDEBAR_PART, this.direction);
|
|
37
44
|
}
|
|
38
45
|
if (isAuxiliaryBarFocus) {
|
|
39
|
-
neighborPart = neighborPart = layoutService.getVisibleNeighborPart(
|
|
46
|
+
neighborPart = neighborPart = layoutService.getVisibleNeighborPart(Parts.AUXILIARYBAR_PART, this.direction);
|
|
40
47
|
}
|
|
41
|
-
if (neighborPart ===
|
|
48
|
+
if (neighborPart === Parts.EDITOR_PART) {
|
|
42
49
|
if (!this.navigateBackToEditorGroup(this.toGroupDirection(this.direction), editorGroupService)) {
|
|
43
|
-
this.navigateToEditorGroup(this.direction ===
|
|
50
|
+
this.navigateToEditorGroup(this.direction === Direction.Right ? GroupLocation.FIRST : GroupLocation.LAST, editorGroupService);
|
|
44
51
|
}
|
|
45
52
|
}
|
|
46
|
-
else if (neighborPart ===
|
|
53
|
+
else if (neighborPart === Parts.SIDEBAR_PART) {
|
|
47
54
|
this.navigateToSidebar(layoutService, paneCompositeService);
|
|
48
55
|
}
|
|
49
|
-
else if (neighborPart ===
|
|
56
|
+
else if (neighborPart === Parts.PANEL_PART) {
|
|
50
57
|
this.navigateToPanel(layoutService, paneCompositeService);
|
|
51
58
|
}
|
|
52
|
-
else if (neighborPart ===
|
|
59
|
+
else if (neighborPart === Parts.AUXILIARYBAR_PART) {
|
|
53
60
|
this.navigateToAuxiliaryBar(layoutService, paneCompositeService);
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
63
|
async navigateToPanel(layoutService, paneCompositeService) {
|
|
57
|
-
if (!layoutService.isVisible(
|
|
64
|
+
if (!layoutService.isVisible(Parts.PANEL_PART)) {
|
|
58
65
|
return false;
|
|
59
66
|
}
|
|
60
|
-
const activePanel = paneCompositeService.getActivePaneComposite(
|
|
67
|
+
const activePanel = paneCompositeService.getActivePaneComposite(ViewContainerLocation.Panel);
|
|
61
68
|
if (!activePanel) {
|
|
62
69
|
return false;
|
|
63
70
|
}
|
|
64
71
|
const activePanelId = activePanel.getId();
|
|
65
|
-
const res = await paneCompositeService.openPaneComposite(activePanelId,
|
|
72
|
+
const res = await paneCompositeService.openPaneComposite(activePanelId, ViewContainerLocation.Panel, true);
|
|
66
73
|
if (!res) {
|
|
67
74
|
return false;
|
|
68
75
|
}
|
|
69
76
|
return res;
|
|
70
77
|
}
|
|
71
78
|
async navigateToSidebar(layoutService, paneCompositeService) {
|
|
72
|
-
if (!layoutService.isVisible(
|
|
79
|
+
if (!layoutService.isVisible(Parts.SIDEBAR_PART)) {
|
|
73
80
|
return false;
|
|
74
81
|
}
|
|
75
|
-
const activeViewlet = paneCompositeService.getActivePaneComposite(
|
|
82
|
+
const activeViewlet = paneCompositeService.getActivePaneComposite(ViewContainerLocation.Sidebar);
|
|
76
83
|
if (!activeViewlet) {
|
|
77
84
|
return false;
|
|
78
85
|
}
|
|
79
86
|
const activeViewletId = activeViewlet.getId();
|
|
80
|
-
const viewlet = await paneCompositeService.openPaneComposite(activeViewletId,
|
|
87
|
+
const viewlet = await paneCompositeService.openPaneComposite(activeViewletId, ViewContainerLocation.Sidebar, true);
|
|
81
88
|
return !!viewlet;
|
|
82
89
|
}
|
|
83
90
|
async navigateToAuxiliaryBar(layoutService, paneCompositeService) {
|
|
84
|
-
if (!layoutService.isVisible(
|
|
91
|
+
if (!layoutService.isVisible(Parts.AUXILIARYBAR_PART)) {
|
|
85
92
|
return false;
|
|
86
93
|
}
|
|
87
|
-
const activePanel = paneCompositeService.getActivePaneComposite(
|
|
94
|
+
const activePanel = paneCompositeService.getActivePaneComposite(ViewContainerLocation.AuxiliaryBar);
|
|
88
95
|
if (!activePanel) {
|
|
89
96
|
return false;
|
|
90
97
|
}
|
|
91
98
|
const activePanelId = activePanel.getId();
|
|
92
|
-
const res = await paneCompositeService.openPaneComposite(activePanelId,
|
|
99
|
+
const res = await paneCompositeService.openPaneComposite(activePanelId, ViewContainerLocation.AuxiliaryBar, true);
|
|
93
100
|
if (!res) {
|
|
94
101
|
return false;
|
|
95
102
|
}
|
|
@@ -115,18 +122,18 @@ class BaseNavigationAction extends Action2 {
|
|
|
115
122
|
}
|
|
116
123
|
toGroupDirection(direction) {
|
|
117
124
|
switch (direction) {
|
|
118
|
-
case
|
|
119
|
-
case
|
|
120
|
-
case
|
|
121
|
-
case
|
|
125
|
+
case Direction.Down: return GroupDirection.DOWN;
|
|
126
|
+
case Direction.Left: return GroupDirection.LEFT;
|
|
127
|
+
case Direction.Right: return GroupDirection.RIGHT;
|
|
128
|
+
case Direction.Up: return GroupDirection.UP;
|
|
122
129
|
}
|
|
123
130
|
}
|
|
124
131
|
toOppositeDirection(direction) {
|
|
125
132
|
switch (direction) {
|
|
126
|
-
case
|
|
127
|
-
case
|
|
128
|
-
case
|
|
129
|
-
case
|
|
133
|
+
case GroupDirection.UP: return GroupDirection.DOWN;
|
|
134
|
+
case GroupDirection.RIGHT: return GroupDirection.LEFT;
|
|
135
|
+
case GroupDirection.LEFT: return GroupDirection.RIGHT;
|
|
136
|
+
case GroupDirection.DOWN: return GroupDirection.UP;
|
|
130
137
|
}
|
|
131
138
|
}
|
|
132
139
|
doNavigateToEditorGroup(scope, editorGroupService) {
|
|
@@ -142,40 +149,40 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
142
149
|
constructor() {
|
|
143
150
|
super({
|
|
144
151
|
id: 'workbench.action.navigateLeft',
|
|
145
|
-
title: ( localize2(
|
|
152
|
+
title: ( localize2(2605, 'Navigate to the View on the Left')),
|
|
146
153
|
category: Categories.View,
|
|
147
154
|
f1: true
|
|
148
|
-
},
|
|
155
|
+
}, Direction.Left);
|
|
149
156
|
}
|
|
150
157
|
});
|
|
151
158
|
registerAction2(class extends BaseNavigationAction {
|
|
152
159
|
constructor() {
|
|
153
160
|
super({
|
|
154
161
|
id: 'workbench.action.navigateRight',
|
|
155
|
-
title: ( localize2(
|
|
162
|
+
title: ( localize2(2606, 'Navigate to the View on the Right')),
|
|
156
163
|
category: Categories.View,
|
|
157
164
|
f1: true
|
|
158
|
-
},
|
|
165
|
+
}, Direction.Right);
|
|
159
166
|
}
|
|
160
167
|
});
|
|
161
168
|
registerAction2(class extends BaseNavigationAction {
|
|
162
169
|
constructor() {
|
|
163
170
|
super({
|
|
164
171
|
id: 'workbench.action.navigateUp',
|
|
165
|
-
title: ( localize2(
|
|
172
|
+
title: ( localize2(2607, 'Navigate to the View Above')),
|
|
166
173
|
category: Categories.View,
|
|
167
174
|
f1: true
|
|
168
|
-
},
|
|
175
|
+
}, Direction.Up);
|
|
169
176
|
}
|
|
170
177
|
});
|
|
171
178
|
registerAction2(class extends BaseNavigationAction {
|
|
172
179
|
constructor() {
|
|
173
180
|
super({
|
|
174
181
|
id: 'workbench.action.navigateDown',
|
|
175
|
-
title: ( localize2(
|
|
182
|
+
title: ( localize2(2608, 'Navigate to the View Below')),
|
|
176
183
|
category: Categories.View,
|
|
177
184
|
f1: true
|
|
178
|
-
},
|
|
185
|
+
}, Direction.Down);
|
|
179
186
|
}
|
|
180
187
|
});
|
|
181
188
|
class BaseFocusAction extends Action2 {
|
|
@@ -194,75 +201,75 @@ class BaseFocusAction extends Action2 {
|
|
|
194
201
|
let neighbour;
|
|
195
202
|
if (windowIsAuxiliary) {
|
|
196
203
|
switch (part) {
|
|
197
|
-
case
|
|
198
|
-
neighbour =
|
|
204
|
+
case Parts.EDITOR_PART:
|
|
205
|
+
neighbour = Parts.STATUSBAR_PART;
|
|
199
206
|
break;
|
|
200
207
|
default:
|
|
201
|
-
neighbour =
|
|
208
|
+
neighbour = Parts.EDITOR_PART;
|
|
202
209
|
}
|
|
203
210
|
}
|
|
204
211
|
else {
|
|
205
212
|
switch (part) {
|
|
206
|
-
case
|
|
207
|
-
neighbour = next ?
|
|
213
|
+
case Parts.EDITOR_PART:
|
|
214
|
+
neighbour = next ? Parts.PANEL_PART : Parts.SIDEBAR_PART;
|
|
208
215
|
break;
|
|
209
|
-
case
|
|
210
|
-
neighbour = next ?
|
|
216
|
+
case Parts.PANEL_PART:
|
|
217
|
+
neighbour = next ? Parts.AUXILIARYBAR_PART : Parts.EDITOR_PART;
|
|
211
218
|
break;
|
|
212
|
-
case
|
|
213
|
-
neighbour = next ?
|
|
219
|
+
case Parts.AUXILIARYBAR_PART:
|
|
220
|
+
neighbour = next ? Parts.STATUSBAR_PART : Parts.PANEL_PART;
|
|
214
221
|
break;
|
|
215
|
-
case
|
|
216
|
-
neighbour = next ?
|
|
222
|
+
case Parts.STATUSBAR_PART:
|
|
223
|
+
neighbour = next ? Parts.ACTIVITYBAR_PART : Parts.AUXILIARYBAR_PART;
|
|
217
224
|
break;
|
|
218
|
-
case
|
|
219
|
-
neighbour = next ?
|
|
225
|
+
case Parts.ACTIVITYBAR_PART:
|
|
226
|
+
neighbour = next ? Parts.SIDEBAR_PART : Parts.STATUSBAR_PART;
|
|
220
227
|
break;
|
|
221
|
-
case
|
|
222
|
-
neighbour = next ?
|
|
228
|
+
case Parts.SIDEBAR_PART:
|
|
229
|
+
neighbour = next ? Parts.EDITOR_PART : Parts.ACTIVITYBAR_PART;
|
|
223
230
|
break;
|
|
224
231
|
default:
|
|
225
|
-
neighbour =
|
|
232
|
+
neighbour = Parts.EDITOR_PART;
|
|
226
233
|
}
|
|
227
234
|
}
|
|
228
|
-
if (layoutService.isVisible(neighbour, activeWindow) || neighbour ===
|
|
235
|
+
if (layoutService.isVisible(neighbour, activeWindow) || neighbour === Parts.EDITOR_PART) {
|
|
229
236
|
return neighbour;
|
|
230
237
|
}
|
|
231
238
|
return this.findVisibleNeighbour(layoutService, neighbour, next);
|
|
232
239
|
}
|
|
233
240
|
focusNextOrPreviousPart(layoutService, editorService, next) {
|
|
234
241
|
let currentlyFocusedPart;
|
|
235
|
-
if (editorService.activeEditorPane?.hasFocus() || layoutService.hasFocus(
|
|
236
|
-
currentlyFocusedPart =
|
|
242
|
+
if (editorService.activeEditorPane?.hasFocus() || layoutService.hasFocus(Parts.EDITOR_PART)) {
|
|
243
|
+
currentlyFocusedPart = Parts.EDITOR_PART;
|
|
237
244
|
}
|
|
238
|
-
else if (layoutService.hasFocus(
|
|
239
|
-
currentlyFocusedPart =
|
|
245
|
+
else if (layoutService.hasFocus(Parts.ACTIVITYBAR_PART)) {
|
|
246
|
+
currentlyFocusedPart = Parts.ACTIVITYBAR_PART;
|
|
240
247
|
}
|
|
241
|
-
else if (layoutService.hasFocus(
|
|
242
|
-
currentlyFocusedPart =
|
|
248
|
+
else if (layoutService.hasFocus(Parts.STATUSBAR_PART)) {
|
|
249
|
+
currentlyFocusedPart = Parts.STATUSBAR_PART;
|
|
243
250
|
}
|
|
244
|
-
else if (layoutService.hasFocus(
|
|
245
|
-
currentlyFocusedPart =
|
|
251
|
+
else if (layoutService.hasFocus(Parts.SIDEBAR_PART)) {
|
|
252
|
+
currentlyFocusedPart = Parts.SIDEBAR_PART;
|
|
246
253
|
}
|
|
247
|
-
else if (layoutService.hasFocus(
|
|
248
|
-
currentlyFocusedPart =
|
|
254
|
+
else if (layoutService.hasFocus(Parts.AUXILIARYBAR_PART)) {
|
|
255
|
+
currentlyFocusedPart = Parts.AUXILIARYBAR_PART;
|
|
249
256
|
}
|
|
250
|
-
else if (layoutService.hasFocus(
|
|
251
|
-
currentlyFocusedPart =
|
|
257
|
+
else if (layoutService.hasFocus(Parts.PANEL_PART)) {
|
|
258
|
+
currentlyFocusedPart = Parts.PANEL_PART;
|
|
252
259
|
}
|
|
253
|
-
layoutService.focusPart(currentlyFocusedPart ? this.findVisibleNeighbour(layoutService, currentlyFocusedPart, next) :
|
|
260
|
+
layoutService.focusPart(currentlyFocusedPart ? this.findVisibleNeighbour(layoutService, currentlyFocusedPart, next) : Parts.EDITOR_PART, getActiveWindow());
|
|
254
261
|
}
|
|
255
262
|
}
|
|
256
263
|
registerAction2(class extends BaseFocusAction {
|
|
257
264
|
constructor() {
|
|
258
265
|
super({
|
|
259
266
|
id: 'workbench.action.focusNextPart',
|
|
260
|
-
title: ( localize2(
|
|
267
|
+
title: ( localize2(2609, 'Focus Next Part')),
|
|
261
268
|
category: Categories.View,
|
|
262
269
|
f1: true,
|
|
263
270
|
keybinding: {
|
|
264
|
-
primary:
|
|
265
|
-
weight:
|
|
271
|
+
primary: KeyCode.F6,
|
|
272
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
266
273
|
}
|
|
267
274
|
}, true);
|
|
268
275
|
}
|
|
@@ -271,12 +278,12 @@ registerAction2(class extends BaseFocusAction {
|
|
|
271
278
|
constructor() {
|
|
272
279
|
super({
|
|
273
280
|
id: 'workbench.action.focusPreviousPart',
|
|
274
|
-
title: ( localize2(
|
|
281
|
+
title: ( localize2(2610, 'Focus Previous Part')),
|
|
275
282
|
category: Categories.View,
|
|
276
283
|
f1: true,
|
|
277
284
|
keybinding: {
|
|
278
|
-
primary:
|
|
279
|
-
weight:
|
|
285
|
+
primary: KeyMod.Shift | KeyCode.F6,
|
|
286
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
280
287
|
}
|
|
281
288
|
}, false);
|
|
282
289
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|