@codingame/monaco-vscode-view-common-service-override 9.0.3 → 10.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/override/vs/workbench/browser/parts/editor/textEditor.weak.js +1 -1
- package/package.json +3 -3
- package/viewCommon.js +4 -1
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +1 -2
- package/vscode/src/vs/base/browser/ui/grid/grid.js +24 -34
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +34 -35
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.js +38 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +65 -65
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +85 -85
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +74 -80
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +73 -69
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -24
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +77 -59
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +9 -11
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +3 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +172 -173
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +16 -18
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +55 -61
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +19 -22
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +76 -65
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +37 -18
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +4 -5
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +20 -15
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +6 -10
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +31 -45
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +37 -40
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +18 -28
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +8 -8
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +2 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +3 -4
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +2 -8
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +14 -15
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +0 -1
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +21 -21
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +28 -29
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +6 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +4 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +9 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +19 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +10 -9
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +9 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +26 -26
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +2 -2
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +16 -17
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +3 -4
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +33 -36
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +18 -28
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +8 -8
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +7 -8
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +13 -15
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +3 -4
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +3 -4
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +0 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +0 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +28 -30
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +71 -74
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +22 -26
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +0 -1
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +16 -18
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +9 -10
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
4
4
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import { Extensions
|
|
5
|
+
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
6
6
|
import { workbenchConfigurationNodeBase } from 'vscode/vscode/vs/workbench/common/configuration';
|
|
7
7
|
import { RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
8
8
|
import { IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService.service';
|
|
@@ -24,22 +24,22 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
24
24
|
static { this.AUTO_LOCK_EXTRA_EDITORS = [
|
|
25
25
|
{
|
|
26
26
|
id: 'workbench.input.interactive',
|
|
27
|
-
label: ( localize(
|
|
27
|
+
label: ( localize(9837, 'Interactive Window')),
|
|
28
28
|
priority: RegisteredEditorPriority.builtin
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
id: 'mainThreadWebview-markdown.preview',
|
|
32
|
-
label: ( localize(
|
|
32
|
+
label: ( localize(9838, "Markdown Preview")),
|
|
33
33
|
priority: RegisteredEditorPriority.builtin
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
id: 'mainThreadWebview-simpleBrowser.view',
|
|
37
|
-
label: ( localize(
|
|
37
|
+
label: ( localize(9839, "Simple Browser")),
|
|
38
38
|
priority: RegisteredEditorPriority.builtin
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
id: 'mainThreadWebview-browserPreview',
|
|
42
|
-
label: ( localize(
|
|
42
|
+
label: ( localize(9840, "Live Preview")),
|
|
43
43
|
priority: RegisteredEditorPriority.builtin
|
|
44
44
|
}
|
|
45
45
|
]; }
|
|
@@ -84,7 +84,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
84
84
|
'workbench.editor.autoLockGroups': {
|
|
85
85
|
type: 'object',
|
|
86
86
|
description: ( localize(
|
|
87
|
-
|
|
87
|
+
9841,
|
|
88
88
|
"If an editor matching one of the listed types is opened as the first in an editor group and more than one group is open, the group is automatically locked. Locked groups will only be used for opening editors when explicitly chosen by a user gesture (for example drag and drop), but not by default. Consequently, the active editor in a locked group is less likely to be replaced accidentally with a different editor."
|
|
89
89
|
)),
|
|
90
90
|
properties: autoLockGroupConfiguration,
|
|
@@ -102,7 +102,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
102
102
|
default: '',
|
|
103
103
|
enum: [...binaryEditorCandidates, ''],
|
|
104
104
|
description: ( localize(
|
|
105
|
-
|
|
105
|
+
9842,
|
|
106
106
|
"The default editor for files detected as binary. If undefined, the user will be presented with a picker."
|
|
107
107
|
)),
|
|
108
108
|
}
|
|
@@ -115,7 +115,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
115
115
|
'workbench.editorAssociations': {
|
|
116
116
|
type: 'object',
|
|
117
117
|
markdownDescription: ( localize(
|
|
118
|
-
|
|
118
|
+
9843,
|
|
119
119
|
"Configure [glob patterns](https://aka.ms/vscode-glob-patterns) to editors (for example `\"*.hex\": \"hexEditor.hexedit\"`). These have precedence over the default behavior."
|
|
120
120
|
)),
|
|
121
121
|
patternProperties: {
|
|
@@ -135,9 +135,9 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
135
135
|
type: 'number',
|
|
136
136
|
default: getLargeFileConfirmationLimit(this.environmentService.remoteAuthority) / ByteSize.MB,
|
|
137
137
|
minimum: 1,
|
|
138
|
-
scope:
|
|
138
|
+
scope: 4 ,
|
|
139
139
|
markdownDescription: ( localize(
|
|
140
|
-
|
|
140
|
+
9844,
|
|
141
141
|
"Controls the minimum size of a file in MB before asking for confirmation when opening in the editor. Note that this setting may not apply to all editor types and environments."
|
|
142
142
|
)),
|
|
143
143
|
}
|
|
@@ -29,9 +29,7 @@ import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/co
|
|
|
29
29
|
import { LocalSelectionTransfer, Extensions, containsDragType, CodeDataTransfers } from 'vscode/vscode/vs/platform/dnd/browser/dnd';
|
|
30
30
|
import { DraggedEditorGroupIdentifier, DraggedEditorIdentifier, extractTreeDropData, ResourcesDropHandler } from 'vscode/vscode/vs/workbench/browser/dnd';
|
|
31
31
|
import { fillActiveEditorViewState } from 'vscode/vscode/vs/workbench/browser/parts/editor/editor';
|
|
32
|
-
import { EditorInputCapabilities } from 'vscode/vscode/vs/workbench/common/editor';
|
|
33
32
|
import { EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_DROP_INTO_PROMPT_BACKGROUND, EDITOR_DROP_INTO_PROMPT_FOREGROUND, EDITOR_DROP_INTO_PROMPT_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
|
|
34
|
-
import { MergeGroupMode, GroupDirection } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
35
33
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
36
34
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
37
35
|
import { ITreeViewsDnDService } from 'vscode/vscode/vs/editor/common/services/treeViewsDndService';
|
|
@@ -79,7 +77,7 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
79
77
|
this.overlay.classList.add('editor-group-overlay-indicator');
|
|
80
78
|
container.appendChild(this.overlay);
|
|
81
79
|
if (this.enableDropIntoEditor) {
|
|
82
|
-
this.dropIntoPromptElement = renderFormattedText(( localize(
|
|
80
|
+
this.dropIntoPromptElement = renderFormattedText(( localize(10983, "Hold __{0}__ to drop into editor", isMacintosh ? '⇧' : 'Shift')), {});
|
|
83
81
|
this.dropIntoPromptElement.classList.add('editor-group-overlay-drop-into-prompt');
|
|
84
82
|
this.overlay.appendChild(this.dropIntoPromptElement);
|
|
85
83
|
}
|
|
@@ -165,7 +163,7 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
165
163
|
}));
|
|
166
164
|
}
|
|
167
165
|
isDropIntoActiveEditorEnabled() {
|
|
168
|
-
return !!this.groupView.activeEditor?.hasCapability(
|
|
166
|
+
return !!this.groupView.activeEditor?.hasCapability(128 );
|
|
169
167
|
}
|
|
170
168
|
findSourceGroupView() {
|
|
171
169
|
if (this.groupTransfer.hasData(DraggedEditorGroupIdentifier.prototype)) {
|
|
@@ -213,7 +211,7 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
213
211
|
else {
|
|
214
212
|
let mergeGroupOptions = undefined;
|
|
215
213
|
if (this.isCopyOperation(event)) {
|
|
216
|
-
mergeGroupOptions = { mode:
|
|
214
|
+
mergeGroupOptions = { mode: 0 };
|
|
217
215
|
}
|
|
218
216
|
this.editorGroupService.mergeGroup(sourceGroup, this.groupView, mergeGroupOptions);
|
|
219
217
|
}
|
|
@@ -283,7 +281,7 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
283
281
|
}
|
|
284
282
|
}
|
|
285
283
|
isCopyOperation(e, draggedEditor) {
|
|
286
|
-
if (draggedEditor?.editor.hasCapability(
|
|
284
|
+
if (draggedEditor?.editor.hasCapability(8 )) {
|
|
287
285
|
return false;
|
|
288
286
|
}
|
|
289
287
|
return (e.ctrlKey && !isMacintosh) || (e.altKey && isMacintosh);
|
|
@@ -327,47 +325,47 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
327
325
|
else {
|
|
328
326
|
if (preferSplitVertically) {
|
|
329
327
|
if (mousePosX < splitWidthThreshold) {
|
|
330
|
-
splitDirection =
|
|
328
|
+
splitDirection = 2 ;
|
|
331
329
|
}
|
|
332
330
|
else if (mousePosX > splitWidthThreshold * 2) {
|
|
333
|
-
splitDirection =
|
|
331
|
+
splitDirection = 3 ;
|
|
334
332
|
}
|
|
335
333
|
else if (mousePosY < editorControlHeight / 2) {
|
|
336
|
-
splitDirection =
|
|
334
|
+
splitDirection = 0 ;
|
|
337
335
|
}
|
|
338
336
|
else {
|
|
339
|
-
splitDirection =
|
|
337
|
+
splitDirection = 1 ;
|
|
340
338
|
}
|
|
341
339
|
}
|
|
342
340
|
else {
|
|
343
341
|
if (mousePosY < splitHeightThreshold) {
|
|
344
|
-
splitDirection =
|
|
342
|
+
splitDirection = 0 ;
|
|
345
343
|
}
|
|
346
344
|
else if (mousePosY > splitHeightThreshold * 2) {
|
|
347
|
-
splitDirection =
|
|
345
|
+
splitDirection = 1 ;
|
|
348
346
|
}
|
|
349
347
|
else if (mousePosX < editorControlWidth / 2) {
|
|
350
|
-
splitDirection =
|
|
348
|
+
splitDirection = 2 ;
|
|
351
349
|
}
|
|
352
350
|
else {
|
|
353
|
-
splitDirection =
|
|
351
|
+
splitDirection = 3 ;
|
|
354
352
|
}
|
|
355
353
|
}
|
|
356
354
|
}
|
|
357
355
|
switch (splitDirection) {
|
|
358
|
-
case
|
|
356
|
+
case 0 :
|
|
359
357
|
this.doPositionOverlay({ top: '0', left: '0', width: '100%', height: '50%' });
|
|
360
358
|
this.toggleDropIntoPrompt(false);
|
|
361
359
|
break;
|
|
362
|
-
case
|
|
360
|
+
case 1 :
|
|
363
361
|
this.doPositionOverlay({ top: '50%', left: '0', width: '100%', height: '50%' });
|
|
364
362
|
this.toggleDropIntoPrompt(false);
|
|
365
363
|
break;
|
|
366
|
-
case
|
|
364
|
+
case 2 :
|
|
367
365
|
this.doPositionOverlay({ top: '0', left: '0', width: '50%', height: '100%' });
|
|
368
366
|
this.toggleDropIntoPrompt(false);
|
|
369
367
|
break;
|
|
370
|
-
case
|
|
368
|
+
case 3 :
|
|
371
369
|
this.doPositionOverlay({ top: '0', left: '50%', width: '50%', height: '100%' });
|
|
372
370
|
this.toggleDropIntoPrompt(false);
|
|
373
371
|
break;
|
|
@@ -14,24 +14,20 @@ import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
|
14
14
|
import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
15
15
|
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
16
16
|
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
17
|
-
import { GroupOrientation, GroupsOrder, GroupLocation, GroupsArrangement, GroupDirection, MergeGroupMode } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
18
17
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
19
|
-
import { isGridBranchNode, createSerializedGrid, Sizing,
|
|
20
|
-
import { GroupModelChangeKind } from 'vscode/vscode/vs/workbench/common/editor';
|
|
18
|
+
import { isGridBranchNode, createSerializedGrid, Sizing, SerializableGrid } from '../../../../base/browser/ui/grid/grid.js';
|
|
21
19
|
import { EDITOR_GROUP_BORDER, EDITOR_PANE_BACKGROUND } from 'vscode/vscode/vs/workbench/common/theme';
|
|
22
20
|
import { coalesce, distinct } from 'vscode/vscode/vs/base/common/arrays';
|
|
23
21
|
import { getEditorPartOptions, impactsEditorPartOptions } from 'vscode/vscode/vs/workbench/browser/parts/editor/editor';
|
|
24
22
|
import { EditorGroupView } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorGroupView';
|
|
25
23
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
26
24
|
import { DisposableStore, toDisposable, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
27
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
28
25
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
29
26
|
import { isSerializedEditorGroupModel } from 'vscode/vscode/vs/workbench/common/editor/editorGroupModel';
|
|
30
27
|
import { EditorDropTarget } from './editorDropTarget.js';
|
|
31
28
|
import { Color } from 'vscode/vscode/vs/base/common/color';
|
|
32
29
|
import { CenteredViewLayout } from '../../../../base/browser/ui/centered/centeredViewLayout.js';
|
|
33
30
|
import { onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
34
|
-
import { Parts, Position } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
35
31
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
36
32
|
import { assertType, assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
37
33
|
import { CompositeDragAndDropObserver } from 'vscode/vscode/vs/workbench/browser/dnd';
|
|
@@ -43,9 +39,7 @@ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/
|
|
|
43
39
|
import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
44
40
|
import { IsAuxiliaryEditorPartContext, EditorPartMultipleEditorGroupsContext, EditorPartMaximizedEditorGroupContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
45
41
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
46
|
-
import { LayoutPriority } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
47
42
|
import { orthogonal } from '../../../../base/browser/ui/grid/gridview.js';
|
|
48
|
-
import { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
49
43
|
|
|
50
44
|
var EditorPart_1;
|
|
51
45
|
class GridWidgetView {
|
|
@@ -123,8 +117,8 @@ let EditorPart = class EditorPart extends Part {
|
|
|
123
117
|
this.onDidChangeEditorPartOptions = this._onDidChangeEditorPartOptions.event;
|
|
124
118
|
this._onWillDispose = this._register(( new Emitter()));
|
|
125
119
|
this.onWillDispose = this._onWillDispose.event;
|
|
126
|
-
this.workspaceMemento = this.getMemento(
|
|
127
|
-
this.profileMemento = this.getMemento(
|
|
120
|
+
this.workspaceMemento = this.getMemento(1 , 0 );
|
|
121
|
+
this.profileMemento = this.getMemento(0 , 1 );
|
|
128
122
|
this.groupViews = ( new Map());
|
|
129
123
|
this.mostRecentActiveGroups = [];
|
|
130
124
|
this.gridWidgetDisposables = this._register(( new DisposableStore()));
|
|
@@ -145,13 +139,13 @@ let EditorPart = class EditorPart extends Part {
|
|
|
145
139
|
this.whenRestoredPromise = ( new DeferredPromise());
|
|
146
140
|
this.whenRestored = this.whenRestoredPromise.p;
|
|
147
141
|
this._willRestoreState = false;
|
|
148
|
-
this.priority =
|
|
142
|
+
this.priority = 2 ;
|
|
149
143
|
this.registerListeners();
|
|
150
144
|
}
|
|
151
145
|
registerListeners() {
|
|
152
146
|
this._register(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(e)));
|
|
153
147
|
this._register(this.themeService.onDidFileIconThemeChange(() => this.handleChangedPartOptions()));
|
|
154
|
-
this._register(this.onDidChangeMementoValue(
|
|
148
|
+
this._register(this.onDidChangeMementoValue(1 , this._store)(e => this.onDidChangeMementoState(e)));
|
|
155
149
|
}
|
|
156
150
|
onConfigurationUpdated(event) {
|
|
157
151
|
if (impactsEditorPartOptions(event)) {
|
|
@@ -187,22 +181,22 @@ let EditorPart = class EditorPart extends Part {
|
|
|
187
181
|
return this.groupViews.size;
|
|
188
182
|
}
|
|
189
183
|
get orientation() {
|
|
190
|
-
return (this.gridWidget && this.gridWidget.orientation ===
|
|
184
|
+
return ((this.gridWidget && this.gridWidget.orientation === 0) ) ? 1 : 0 ;
|
|
191
185
|
}
|
|
192
186
|
get isReady() { return this._isReady; }
|
|
193
187
|
get hasRestorableState() {
|
|
194
188
|
return !!this.workspaceMemento[EditorPart_1.EDITOR_PART_UI_STATE_STORAGE_KEY];
|
|
195
189
|
}
|
|
196
190
|
get willRestoreState() { return this._willRestoreState; }
|
|
197
|
-
getGroups(order =
|
|
191
|
+
getGroups(order = 0 ) {
|
|
198
192
|
switch (order) {
|
|
199
|
-
case
|
|
193
|
+
case 0 :
|
|
200
194
|
return this.groups;
|
|
201
|
-
case
|
|
195
|
+
case 1 : {
|
|
202
196
|
const mostRecentActive = coalesce(( this.mostRecentActiveGroups.map(groupId => this.getGroup(groupId))));
|
|
203
197
|
return distinct([...mostRecentActive, ...this.groups]);
|
|
204
198
|
}
|
|
205
|
-
case
|
|
199
|
+
case 2 : {
|
|
206
200
|
const views = [];
|
|
207
201
|
if (this.gridWidget) {
|
|
208
202
|
this.fillGridNodes(views, this.gridWidget.getViews());
|
|
@@ -242,24 +236,24 @@ let EditorPart = class EditorPart extends Part {
|
|
|
242
236
|
}
|
|
243
237
|
doFindGroupByLocation(location, source, wrap) {
|
|
244
238
|
const sourceGroupView = this.assertGroupView(source);
|
|
245
|
-
const groups = this.getGroups(
|
|
239
|
+
const groups = this.getGroups(2 );
|
|
246
240
|
const index = groups.indexOf(sourceGroupView);
|
|
247
241
|
switch (location) {
|
|
248
|
-
case
|
|
242
|
+
case 0 :
|
|
249
243
|
return groups[0];
|
|
250
|
-
case
|
|
244
|
+
case 1 :
|
|
251
245
|
return groups[groups.length - 1];
|
|
252
|
-
case
|
|
246
|
+
case 2 : {
|
|
253
247
|
let nextGroup = groups[index + 1];
|
|
254
248
|
if (!nextGroup && wrap) {
|
|
255
|
-
nextGroup = this.doFindGroupByLocation(
|
|
249
|
+
nextGroup = this.doFindGroupByLocation(0 , source);
|
|
256
250
|
}
|
|
257
251
|
return nextGroup;
|
|
258
252
|
}
|
|
259
|
-
case
|
|
253
|
+
case 3 : {
|
|
260
254
|
let previousGroup = groups[index - 1];
|
|
261
255
|
if (!previousGroup && wrap) {
|
|
262
|
-
previousGroup = this.doFindGroupByLocation(
|
|
256
|
+
previousGroup = this.doFindGroupByLocation(1 , source);
|
|
263
257
|
}
|
|
264
258
|
return previousGroup;
|
|
265
259
|
}
|
|
@@ -295,17 +289,17 @@ let EditorPart = class EditorPart extends Part {
|
|
|
295
289
|
}
|
|
296
290
|
const groupView = this.assertGroupView(target);
|
|
297
291
|
switch (arrangement) {
|
|
298
|
-
case
|
|
292
|
+
case 2 :
|
|
299
293
|
this.gridWidget.distributeViewSizes();
|
|
300
294
|
break;
|
|
301
|
-
case
|
|
295
|
+
case 0 :
|
|
302
296
|
if (this.groups.length < 2) {
|
|
303
297
|
return;
|
|
304
298
|
}
|
|
305
299
|
this.gridWidget.maximizeView(groupView);
|
|
306
300
|
groupView.focus();
|
|
307
301
|
break;
|
|
308
|
-
case
|
|
302
|
+
case 1 :
|
|
309
303
|
this.gridWidget.expandView(groupView);
|
|
310
304
|
break;
|
|
311
305
|
}
|
|
@@ -315,15 +309,15 @@ let EditorPart = class EditorPart extends Part {
|
|
|
315
309
|
this.unmaximizeGroup();
|
|
316
310
|
}
|
|
317
311
|
else {
|
|
318
|
-
this.arrangeGroups(
|
|
312
|
+
this.arrangeGroups(0 , target);
|
|
319
313
|
}
|
|
320
314
|
}
|
|
321
315
|
toggleExpandGroup(target = this.activeGroup) {
|
|
322
316
|
if (this.isGroupExpanded(this.activeGroup)) {
|
|
323
|
-
this.arrangeGroups(
|
|
317
|
+
this.arrangeGroups(2 );
|
|
324
318
|
}
|
|
325
319
|
else {
|
|
326
|
-
this.arrangeGroups(
|
|
320
|
+
this.arrangeGroups(1 , target);
|
|
327
321
|
}
|
|
328
322
|
}
|
|
329
323
|
unmaximizeGroup() {
|
|
@@ -343,7 +337,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
343
337
|
if (!this.gridWidget) {
|
|
344
338
|
return;
|
|
345
339
|
}
|
|
346
|
-
const newOrientation = (orientation ===
|
|
340
|
+
const newOrientation = ((orientation === 0) ) ? 1 : 0 ;
|
|
347
341
|
if (this.gridWidget.orientation !== newOrientation) {
|
|
348
342
|
this.gridWidget.orientation = newOrientation;
|
|
349
343
|
}
|
|
@@ -362,7 +356,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
362
356
|
}
|
|
363
357
|
}
|
|
364
358
|
countGroups(layout.groups);
|
|
365
|
-
let currentGroupViews = this.getGroups(
|
|
359
|
+
let currentGroupViews = this.getGroups(2 );
|
|
366
360
|
if (layoutGroupsCount < currentGroupViews.length) {
|
|
367
361
|
const lastGroupInLayout = currentGroupViews[layoutGroupsCount - 1];
|
|
368
362
|
currentGroupViews.forEach((group, index) => {
|
|
@@ -370,7 +364,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
370
364
|
this.mergeGroup(group, lastGroupInLayout);
|
|
371
365
|
}
|
|
372
366
|
});
|
|
373
|
-
currentGroupViews = this.getGroups(
|
|
367
|
+
currentGroupViews = this.getGroups(2 );
|
|
374
368
|
}
|
|
375
369
|
const activeGroup = this.activeGroup;
|
|
376
370
|
const gridDescriptor = createSerializedGrid({
|
|
@@ -387,7 +381,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
387
381
|
}
|
|
388
382
|
getLayout() {
|
|
389
383
|
const serializedGrid = this.gridWidget.serialize();
|
|
390
|
-
const orientation = serializedGrid.orientation ===
|
|
384
|
+
const orientation = serializedGrid.orientation === 1 ? 0 : 1 ;
|
|
391
385
|
const root = this.serializedNodeToGroupLayoutArgument(serializedGrid.root);
|
|
392
386
|
return {
|
|
393
387
|
orientation,
|
|
@@ -432,7 +426,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
432
426
|
this._onDidAddGroup.fire(newGroupView);
|
|
433
427
|
this.notifyGroupIndexChange();
|
|
434
428
|
if (shouldExpand) {
|
|
435
|
-
this.arrangeGroups(
|
|
429
|
+
this.arrangeGroups(1 , newGroupView);
|
|
436
430
|
}
|
|
437
431
|
if (restoreFocus) {
|
|
438
432
|
locationView.focus();
|
|
@@ -472,13 +466,13 @@ let EditorPart = class EditorPart extends Part {
|
|
|
472
466
|
}));
|
|
473
467
|
groupDisposables.add(groupView.onDidModelChange(e => {
|
|
474
468
|
switch (e.kind) {
|
|
475
|
-
case
|
|
469
|
+
case 3 :
|
|
476
470
|
this._onDidChangeGroupLocked.fire(groupView);
|
|
477
471
|
break;
|
|
478
|
-
case
|
|
472
|
+
case 1 :
|
|
479
473
|
this._onDidChangeGroupIndex.fire(groupView);
|
|
480
474
|
break;
|
|
481
|
-
case
|
|
475
|
+
case 2 :
|
|
482
476
|
this._onDidChangeGroupLabel.fire(groupView);
|
|
483
477
|
break;
|
|
484
478
|
}
|
|
@@ -517,7 +511,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
517
511
|
try {
|
|
518
512
|
const viewSize = this.gridWidget.getViewSize(group);
|
|
519
513
|
if (viewSize.width === group.minimumWidth || viewSize.height === group.minimumHeight) {
|
|
520
|
-
this.arrangeGroups(
|
|
514
|
+
this.arrangeGroups(1 , group);
|
|
521
515
|
}
|
|
522
516
|
}
|
|
523
517
|
catch (error) {
|
|
@@ -534,15 +528,15 @@ let EditorPart = class EditorPart extends Part {
|
|
|
534
528
|
}
|
|
535
529
|
toGridViewDirection(direction) {
|
|
536
530
|
switch (direction) {
|
|
537
|
-
case
|
|
538
|
-
case
|
|
539
|
-
case
|
|
540
|
-
case
|
|
531
|
+
case 0 : return 0 ;
|
|
532
|
+
case 1 : return 1 ;
|
|
533
|
+
case 2 : return 2 ;
|
|
534
|
+
case 3 : return 3 ;
|
|
541
535
|
}
|
|
542
536
|
}
|
|
543
537
|
toGridViewOrientation(orientation, fallback) {
|
|
544
538
|
if (typeof orientation === 'number') {
|
|
545
|
-
return orientation ===
|
|
539
|
+
return orientation === 0 ? 1 : 0 ;
|
|
546
540
|
}
|
|
547
541
|
return fallback;
|
|
548
542
|
}
|
|
@@ -559,7 +553,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
559
553
|
}
|
|
560
554
|
}
|
|
561
555
|
doRemoveGroupWithEditors(groupView) {
|
|
562
|
-
const mostRecentlyActiveGroups = this.getGroups(
|
|
556
|
+
const mostRecentlyActiveGroups = this.getGroups(1 );
|
|
563
557
|
let lastActiveGroup;
|
|
564
558
|
if (this._activeGroup === groupView) {
|
|
565
559
|
lastActiveGroup = mostRecentlyActiveGroups[1];
|
|
@@ -572,7 +566,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
572
566
|
doRemoveEmptyGroup(groupView, preserveFocus) {
|
|
573
567
|
const restoreFocus = !preserveFocus && this.shouldRestoreFocus(this.container);
|
|
574
568
|
if (this._activeGroup === groupView) {
|
|
575
|
-
const mostRecentlyActiveGroups = this.getGroups(
|
|
569
|
+
const mostRecentlyActiveGroups = this.getGroups(1 );
|
|
576
570
|
const nextActiveGroup = mostRecentlyActiveGroups[1];
|
|
577
571
|
this.doSetGroupActive(nextActiveGroup);
|
|
578
572
|
}
|
|
@@ -632,7 +626,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
632
626
|
index++;
|
|
633
627
|
}
|
|
634
628
|
let result = true;
|
|
635
|
-
if (options?.mode ===
|
|
629
|
+
if (options?.mode === 0 ) {
|
|
636
630
|
sourceView.copyEditors(editors, targetView);
|
|
637
631
|
}
|
|
638
632
|
else {
|
|
@@ -646,7 +640,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
646
640
|
mergeAllGroups(target) {
|
|
647
641
|
const targetView = this.assertGroupView(target);
|
|
648
642
|
let result = true;
|
|
649
|
-
for (const group of this.getGroups(
|
|
643
|
+
for (const group of this.getGroups(1 )) {
|
|
650
644
|
if (group === targetView) {
|
|
651
645
|
continue;
|
|
652
646
|
}
|
|
@@ -758,11 +752,11 @@ let EditorPart = class EditorPart extends Part {
|
|
|
758
752
|
let lastOpenHorizontalPosition;
|
|
759
753
|
let lastOpenVerticalPosition;
|
|
760
754
|
const openPartAtPosition = (position) => {
|
|
761
|
-
if (!this.layoutService.isVisible(
|
|
762
|
-
this.layoutService.setPartHidden(false,
|
|
755
|
+
if (!this.layoutService.isVisible("workbench.parts.panel" ) && position === this.layoutService.getPanelPosition()) {
|
|
756
|
+
this.layoutService.setPartHidden(false, "workbench.parts.panel" );
|
|
763
757
|
}
|
|
764
|
-
else if (!this.layoutService.isVisible(
|
|
765
|
-
this.layoutService.setPartHidden(false,
|
|
758
|
+
else if (!this.layoutService.isVisible("workbench.parts.auxiliarybar" ) && position === ((this.layoutService.getSideBarPosition() === 1 ? 0 : 1) )) {
|
|
759
|
+
this.layoutService.setPartHidden(false, "workbench.parts.auxiliarybar" );
|
|
766
760
|
}
|
|
767
761
|
};
|
|
768
762
|
const clearAllTimeouts = () => {
|
|
@@ -786,16 +780,16 @@ let EditorPart = class EditorPart extends Part {
|
|
|
786
780
|
let openVerticalPosition = undefined;
|
|
787
781
|
const proximity = 100;
|
|
788
782
|
if (e.eventData.clientX < boundingRect.left + proximity) {
|
|
789
|
-
openHorizontalPosition =
|
|
783
|
+
openHorizontalPosition = 0 ;
|
|
790
784
|
}
|
|
791
785
|
if (e.eventData.clientX > boundingRect.right - proximity) {
|
|
792
|
-
openHorizontalPosition =
|
|
786
|
+
openHorizontalPosition = 1 ;
|
|
793
787
|
}
|
|
794
788
|
if (e.eventData.clientY > boundingRect.bottom - proximity) {
|
|
795
|
-
openVerticalPosition =
|
|
789
|
+
openVerticalPosition = 2 ;
|
|
796
790
|
}
|
|
797
791
|
if (e.eventData.clientY < boundingRect.top + proximity) {
|
|
798
|
-
openVerticalPosition =
|
|
792
|
+
openVerticalPosition = 3 ;
|
|
799
793
|
}
|
|
800
794
|
if (horizontalOpenerTimeout && openHorizontalPosition !== lastOpenHorizontalPosition) {
|
|
801
795
|
clearTimeout(horizontalOpenerTimeout);
|
|
@@ -913,7 +907,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
913
907
|
container.classList.toggle('empty', this.isEmpty);
|
|
914
908
|
}
|
|
915
909
|
notifyGroupIndexChange() {
|
|
916
|
-
this.getGroups(
|
|
910
|
+
this.getGroups(2 ).forEach((group, index) => group.notifyIndexChanged(index));
|
|
917
911
|
}
|
|
918
912
|
notifyGroupsLabelChange(newLabel) {
|
|
919
913
|
for (const group of this.groups) {
|
|
@@ -1001,7 +995,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
1001
995
|
this.mergeAllGroups(this.activeGroup);
|
|
1002
996
|
}
|
|
1003
997
|
async doPrepareApplyState() {
|
|
1004
|
-
const groups = this.getGroups(
|
|
998
|
+
const groups = this.getGroups(1 );
|
|
1005
999
|
for (const group of groups) {
|
|
1006
1000
|
await group.closeAllEditors({ excludeConfirming: true });
|
|
1007
1001
|
}
|
|
@@ -1011,7 +1005,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
1011
1005
|
this.doCreateGridControlWithState(gridState, activeGroupId, editorGroupViewsToReuse, options);
|
|
1012
1006
|
this.doLayout(this._contentDimension);
|
|
1013
1007
|
this.updateContainer();
|
|
1014
|
-
for (const groupView of this.getGroups(
|
|
1008
|
+
for (const groupView of this.getGroups(2 )) {
|
|
1015
1009
|
if (!editorGroupViewsToReuse?.includes(groupView)) {
|
|
1016
1010
|
this._onDidAddGroup.fire(groupView);
|
|
1017
1011
|
}
|
|
@@ -1019,7 +1013,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
1019
1013
|
this.notifyGroupIndexChange();
|
|
1020
1014
|
}
|
|
1021
1015
|
onDidChangeMementoState(e) {
|
|
1022
|
-
if (e.external && e.scope ===
|
|
1016
|
+
if (e.external && e.scope === 1 ) {
|
|
1023
1017
|
this.reloadMemento(e.scope);
|
|
1024
1018
|
const state = this.loadState();
|
|
1025
1019
|
if (state) {
|
|
@@ -1029,7 +1023,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
1029
1023
|
}
|
|
1030
1024
|
toJSON() {
|
|
1031
1025
|
return {
|
|
1032
|
-
type:
|
|
1026
|
+
type: "workbench.parts.editor"
|
|
1033
1027
|
};
|
|
1034
1028
|
}
|
|
1035
1029
|
disposeGroups() {
|
|
@@ -1058,7 +1052,7 @@ EditorPart = EditorPart_1 = ( __decorate([
|
|
|
1058
1052
|
], EditorPart));
|
|
1059
1053
|
let MainEditorPart = class MainEditorPart extends EditorPart {
|
|
1060
1054
|
constructor(editorPartsView, instantiationService, themeService, configurationService, storageService, layoutService, hostService, contextKeyService) {
|
|
1061
|
-
super(editorPartsView,
|
|
1055
|
+
super(editorPartsView, "workbench.parts.editor" , '', mainWindow.vscodeWindowId, instantiationService, themeService, configurationService, storageService, layoutService, hostService, contextKeyService);
|
|
1062
1056
|
}
|
|
1063
1057
|
};
|
|
1064
1058
|
MainEditorPart = ( __decorate([
|