@codingame/monaco-vscode-view-common-service-override 4.5.1 → 4.5.2
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/package.json +3 -3
- package/vscode/src/vs/base/browser/ui/grid/grid.js +12 -12
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +26 -26
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +127 -220
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +43 -44
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -30
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -138
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -36
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +26 -27
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +17 -31
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +215 -764
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +24 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +31 -33
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +51 -54
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +38 -41
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +21 -24
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +17 -20
- package/vscode/src/vs/workbench/browser/window.js +41 -92
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +41 -78
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +36 -27
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +14 -15
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +10 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +25 -52
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +55 -87
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +18 -48
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +61 -150
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +15 -70
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +9 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -65
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +38 -113
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +12 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +34 -75
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +16 -37
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +40 -43
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +12 -11
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +24 -61
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +37 -70
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +26 -27
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +50 -52
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +18 -34
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +7 -10
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +2 -2
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +45 -46
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +8 -6
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +45 -68
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +95 -98
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +34 -74
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +69 -67
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +52 -47
|
@@ -13,62 +13,47 @@ import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/service
|
|
|
13
13
|
import { getLargeFileConfirmationLimit, ByteSize } from 'vscode/vscode/vs/platform/files/common/files';
|
|
14
14
|
|
|
15
15
|
var DynamicEditorConfigurations_1;
|
|
16
|
+
const _moduleId = "vs/workbench/browser/parts/editor/editorConfiguration";
|
|
16
17
|
let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disposable {
|
|
17
18
|
static { DynamicEditorConfigurations_1 = this; }
|
|
18
19
|
static { this.ID = 'workbench.contrib.dynamicEditorConfigurations'; }
|
|
19
|
-
static { this.AUTO_LOCK_DEFAULT_ENABLED = ( new Set([
|
|
20
|
+
static { this.AUTO_LOCK_DEFAULT_ENABLED = ( (new Set([
|
|
20
21
|
'terminalEditor',
|
|
21
22
|
'mainThreadWebview-simpleBrowser.view',
|
|
22
23
|
'mainThreadWebview-browserPreview'
|
|
23
|
-
])); }
|
|
24
|
+
]))); }
|
|
24
25
|
static { this.AUTO_LOCK_EXTRA_EDITORS = [
|
|
25
26
|
{
|
|
26
27
|
id: 'workbench.input.interactive',
|
|
27
|
-
label: ( localizeWithPath(
|
|
28
|
-
'vs/workbench/browser/parts/editor/editorConfiguration',
|
|
29
|
-
'interactiveWindow',
|
|
30
|
-
'Interactive Window'
|
|
31
|
-
)),
|
|
28
|
+
label: ( localizeWithPath(_moduleId, 0, 'Interactive Window')),
|
|
32
29
|
priority: RegisteredEditorPriority.builtin
|
|
33
30
|
},
|
|
34
31
|
{
|
|
35
32
|
id: 'mainThreadWebview-markdown.preview',
|
|
36
|
-
label: ( localizeWithPath(
|
|
37
|
-
'vs/workbench/browser/parts/editor/editorConfiguration',
|
|
38
|
-
'markdownPreview',
|
|
39
|
-
"Markdown Preview"
|
|
40
|
-
)),
|
|
33
|
+
label: ( localizeWithPath(_moduleId, 1, "Markdown Preview")),
|
|
41
34
|
priority: RegisteredEditorPriority.builtin
|
|
42
35
|
},
|
|
43
36
|
{
|
|
44
37
|
id: 'mainThreadWebview-simpleBrowser.view',
|
|
45
|
-
label: ( localizeWithPath(
|
|
46
|
-
'vs/workbench/browser/parts/editor/editorConfiguration',
|
|
47
|
-
'simpleBrowser',
|
|
48
|
-
"Simple Browser"
|
|
49
|
-
)),
|
|
38
|
+
label: ( localizeWithPath(_moduleId, 2, "Simple Browser")),
|
|
50
39
|
priority: RegisteredEditorPriority.builtin
|
|
51
40
|
},
|
|
52
41
|
{
|
|
53
42
|
id: 'mainThreadWebview-browserPreview',
|
|
54
|
-
label: ( localizeWithPath(
|
|
55
|
-
'vs/workbench/browser/parts/editor/editorConfiguration',
|
|
56
|
-
'livePreview',
|
|
57
|
-
"Live Preview"
|
|
58
|
-
)),
|
|
43
|
+
label: ( localizeWithPath(_moduleId, 3, "Live Preview")),
|
|
59
44
|
priority: RegisteredEditorPriority.builtin
|
|
60
45
|
}
|
|
61
46
|
]; }
|
|
62
|
-
static { this.AUTO_LOCK_REMOVE_EDITORS = ( new Set([
|
|
47
|
+
static { this.AUTO_LOCK_REMOVE_EDITORS = ( (new Set([
|
|
63
48
|
'vscode-interactive-input',
|
|
64
49
|
'interactive',
|
|
65
50
|
'vscode.markdown.preview.editor'
|
|
66
|
-
])); }
|
|
51
|
+
]))); }
|
|
67
52
|
constructor(editorResolverService, extensionService, environmentService) {
|
|
68
53
|
super();
|
|
69
54
|
this.editorResolverService = editorResolverService;
|
|
70
55
|
this.environmentService = environmentService;
|
|
71
|
-
this.configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
56
|
+
this.configurationRegistry = ( (Registry.as(Extensions.Configuration)));
|
|
72
57
|
(async () => {
|
|
73
58
|
await extensionService.whenInstalledExtensionsRegistered();
|
|
74
59
|
this.updateDynamicEditorConfigurations();
|
|
@@ -79,19 +64,19 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
79
64
|
this._register(Event.debounce(this.editorResolverService.onDidChangeEditorRegistrations, (_, e) => e)(() => this.updateDynamicEditorConfigurations()));
|
|
80
65
|
}
|
|
81
66
|
updateDynamicEditorConfigurations() {
|
|
82
|
-
const lockableEditors = [...this.editorResolverService.getEditors(), ...DynamicEditorConfigurations_1.AUTO_LOCK_EXTRA_EDITORS].filter(e => !( DynamicEditorConfigurations_1.AUTO_LOCK_REMOVE_EDITORS.has(e.id)));
|
|
83
|
-
const binaryEditorCandidates = ( this.editorResolverService.getEditors().filter(e => e.priority !== RegisteredEditorPriority.exclusive).map(e => e.id));
|
|
67
|
+
const lockableEditors = [...this.editorResolverService.getEditors(), ...DynamicEditorConfigurations_1.AUTO_LOCK_EXTRA_EDITORS].filter(e => !( (DynamicEditorConfigurations_1.AUTO_LOCK_REMOVE_EDITORS.has(e.id))));
|
|
68
|
+
const binaryEditorCandidates = ( (this.editorResolverService.getEditors().filter(e => e.priority !== RegisteredEditorPriority.exclusive).map(e => e.id)));
|
|
84
69
|
const autoLockGroupConfiguration = Object.create(null);
|
|
85
70
|
for (const editor of lockableEditors) {
|
|
86
71
|
autoLockGroupConfiguration[editor.id] = {
|
|
87
72
|
type: 'boolean',
|
|
88
|
-
default: ( DynamicEditorConfigurations_1.AUTO_LOCK_DEFAULT_ENABLED.has(editor.id)),
|
|
73
|
+
default: ( (DynamicEditorConfigurations_1.AUTO_LOCK_DEFAULT_ENABLED.has(editor.id))),
|
|
89
74
|
description: editor.label
|
|
90
75
|
};
|
|
91
76
|
}
|
|
92
77
|
const defaultAutoLockGroupConfiguration = Object.create(null);
|
|
93
78
|
for (const editor of lockableEditors) {
|
|
94
|
-
defaultAutoLockGroupConfiguration[editor.id] = ( DynamicEditorConfigurations_1.AUTO_LOCK_DEFAULT_ENABLED.has(editor.id));
|
|
79
|
+
defaultAutoLockGroupConfiguration[editor.id] = ( (DynamicEditorConfigurations_1.AUTO_LOCK_DEFAULT_ENABLED.has(editor.id)));
|
|
95
80
|
}
|
|
96
81
|
const oldAutoLockConfigurationNode = this.autoLockConfigurationNode;
|
|
97
82
|
this.autoLockConfigurationNode = {
|
|
@@ -100,8 +85,8 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
100
85
|
'workbench.editor.autoLockGroups': {
|
|
101
86
|
type: 'object',
|
|
102
87
|
description: ( localizeWithPath(
|
|
103
|
-
|
|
104
|
-
|
|
88
|
+
_moduleId,
|
|
89
|
+
4,
|
|
105
90
|
"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."
|
|
106
91
|
)),
|
|
107
92
|
properties: autoLockGroupConfiguration,
|
|
@@ -119,8 +104,8 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
119
104
|
default: '',
|
|
120
105
|
enum: [...binaryEditorCandidates, ''],
|
|
121
106
|
description: ( localizeWithPath(
|
|
122
|
-
|
|
123
|
-
|
|
107
|
+
_moduleId,
|
|
108
|
+
5,
|
|
124
109
|
"The default editor for files detected as binary. If undefined, the user will be presented with a picker."
|
|
125
110
|
)),
|
|
126
111
|
}
|
|
@@ -133,8 +118,8 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
133
118
|
'workbench.editorAssociations': {
|
|
134
119
|
type: 'object',
|
|
135
120
|
markdownDescription: ( localizeWithPath(
|
|
136
|
-
|
|
137
|
-
|
|
121
|
+
_moduleId,
|
|
122
|
+
6,
|
|
138
123
|
"Configure [glob patterns](https://aka.ms/vscode-glob-patterns) to editors (for example `\"*.hex\": \"hexEditor.hexedit\"`). These have precedence over the default behavior."
|
|
139
124
|
)),
|
|
140
125
|
patternProperties: {
|
|
@@ -156,8 +141,8 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
156
141
|
minimum: 1,
|
|
157
142
|
scope: 4 ,
|
|
158
143
|
markdownDescription: ( localizeWithPath(
|
|
159
|
-
|
|
160
|
-
|
|
144
|
+
_moduleId,
|
|
145
|
+
7,
|
|
161
146
|
"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."
|
|
162
147
|
)),
|
|
163
148
|
}
|
|
@@ -179,10 +164,10 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
179
164
|
});
|
|
180
165
|
}
|
|
181
166
|
};
|
|
182
|
-
DynamicEditorConfigurations = DynamicEditorConfigurations_1 = ( __decorate([
|
|
183
|
-
( __param(0, IEditorResolverService)),
|
|
184
|
-
( __param(1, IExtensionService)),
|
|
185
|
-
( __param(2, IWorkbenchEnvironmentService))
|
|
186
|
-
], DynamicEditorConfigurations));
|
|
167
|
+
DynamicEditorConfigurations = DynamicEditorConfigurations_1 = ( (__decorate([
|
|
168
|
+
( (__param(0, IEditorResolverService))),
|
|
169
|
+
( (__param(1, IExtensionService))),
|
|
170
|
+
( (__param(2, IWorkbenchEnvironmentService)))
|
|
171
|
+
], DynamicEditorConfigurations)));
|
|
187
172
|
|
|
188
173
|
export { DynamicEditorConfigurations };
|
|
@@ -36,6 +36,7 @@ import { ITreeViewsDnDService } from 'vscode/vscode/vs/editor/common/services/tr
|
|
|
36
36
|
import { DraggedTreeItemsIdentifier } from 'vscode/vscode/vs/editor/common/services/treeViewsDnd';
|
|
37
37
|
|
|
38
38
|
var DropOverlay_1;
|
|
39
|
+
const _moduleId = "vs/workbench/browser/parts/editor/editorDropTarget";
|
|
39
40
|
function isDropIntoEditorEnabledGlobally(configurationService) {
|
|
40
41
|
return configurationService.getValue('editor.dropIntoEditor.enabled');
|
|
41
42
|
}
|
|
@@ -58,7 +59,7 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
58
59
|
this.editorTransfer = LocalSelectionTransfer.getInstance();
|
|
59
60
|
this.groupTransfer = LocalSelectionTransfer.getInstance();
|
|
60
61
|
this.treeItemsTransfer = LocalSelectionTransfer.getInstance();
|
|
61
|
-
this.cleanupOverlayScheduler = this._register(( new RunOnceScheduler(() => this.dispose(), 300)));
|
|
62
|
+
this.cleanupOverlayScheduler = this._register(( (new RunOnceScheduler(() => this.dispose(), 300))));
|
|
62
63
|
this.enableDropIntoEditor = isDropIntoEditorEnabledGlobally(this.configurationService) && this.isDropIntoActiveEditorEnabled();
|
|
63
64
|
this.create();
|
|
64
65
|
}
|
|
@@ -78,8 +79,8 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
78
79
|
container.appendChild(this.overlay);
|
|
79
80
|
if (this.enableDropIntoEditor) {
|
|
80
81
|
this.dropIntoPromptElement = renderFormattedText(( localizeWithPath(
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
_moduleId,
|
|
83
|
+
0,
|
|
83
84
|
"Hold __{0}__ to drop into editor",
|
|
84
85
|
isMacintosh ? '⇧' : 'Shift'
|
|
85
86
|
)), {});
|
|
@@ -112,7 +113,7 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
registerListeners(container) {
|
|
115
|
-
this._register(( new DragAndDropObserver(container, {
|
|
116
|
+
this._register(( (new DragAndDropObserver(container, {
|
|
116
117
|
onDragOver: e => {
|
|
117
118
|
if (this.enableDropIntoEditor && isDragIntoEditorEvent(e)) {
|
|
118
119
|
this.dispose();
|
|
@@ -160,7 +161,7 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
160
161
|
this.handleDrop(e, this.currentDropOperation.splitDirection);
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
|
-
})));
|
|
164
|
+
}))));
|
|
164
165
|
this._register(addDisposableListener(container, EventType.MOUSE_OVER, () => {
|
|
165
166
|
if (!this.cleanupOverlayScheduler.isScheduled()) {
|
|
166
167
|
this.cleanupOverlayScheduler.schedule();
|
|
@@ -267,7 +268,7 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
267
268
|
const dataTransferItem = await this.treeViewsDragAndDropService.removeDragOperationTransfer(id.identifier);
|
|
268
269
|
if (dataTransferItem) {
|
|
269
270
|
const treeDropData = await extractTreeDropData(dataTransferItem);
|
|
270
|
-
editors.push(...( treeDropData.map(editor => ({ ...editor, options: { ...editor.options, pinned: true } }))));
|
|
271
|
+
editors.push(...( (treeDropData.map(editor => ({ ...editor, options: { ...editor.options, pinned: true } })))));
|
|
271
272
|
}
|
|
272
273
|
}
|
|
273
274
|
if (editors.length) {
|
|
@@ -420,15 +421,15 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
420
421
|
this._disposed = true;
|
|
421
422
|
}
|
|
422
423
|
};
|
|
423
|
-
DropOverlay = DropOverlay_1 = ( __decorate([
|
|
424
|
-
( __param(1, IThemeService)),
|
|
425
|
-
( __param(2, IConfigurationService)),
|
|
426
|
-
( __param(3, IInstantiationService)),
|
|
427
|
-
( __param(4, IEditorService)),
|
|
428
|
-
( __param(5, IEditorGroupsService)),
|
|
429
|
-
( __param(6, ITreeViewsDnDService)),
|
|
430
|
-
( __param(7, IWorkspaceContextService))
|
|
431
|
-
], DropOverlay));
|
|
424
|
+
DropOverlay = DropOverlay_1 = ( (__decorate([
|
|
425
|
+
( (__param(1, IThemeService))),
|
|
426
|
+
( (__param(2, IConfigurationService))),
|
|
427
|
+
( (__param(3, IInstantiationService))),
|
|
428
|
+
( (__param(4, IEditorService))),
|
|
429
|
+
( (__param(5, IEditorGroupsService))),
|
|
430
|
+
( (__param(6, ITreeViewsDnDService))),
|
|
431
|
+
( (__param(7, IWorkspaceContextService)))
|
|
432
|
+
], DropOverlay)));
|
|
432
433
|
let EditorDropTarget = class EditorDropTarget extends Themable {
|
|
433
434
|
constructor(container, delegate, editorGroupService, themeService, configurationService, instantiationService) {
|
|
434
435
|
super(themeService);
|
|
@@ -463,8 +464,8 @@ let EditorDropTarget = class EditorDropTarget extends Themable {
|
|
|
463
464
|
if (!this.editorTransfer.hasData(DraggedEditorIdentifier.prototype) &&
|
|
464
465
|
!this.groupTransfer.hasData(DraggedEditorGroupIdentifier.prototype) &&
|
|
465
466
|
event.dataTransfer) {
|
|
466
|
-
const dndContributions = ( Registry.as(Extensions.DragAndDropContribution)).getAll();
|
|
467
|
-
const dndContributionKeys = ( Array.from(dndContributions).map(e => e.dataFormatKey));
|
|
467
|
+
const dndContributions = ( (Registry.as(Extensions.DragAndDropContribution))).getAll();
|
|
468
|
+
const dndContributionKeys = ( (Array.from(dndContributions).map(e => e.dataFormatKey)));
|
|
468
469
|
if (!containsDragType(event, DataTransfers.FILES, CodeDataTransfers.FILES, DataTransfers.RESOURCES, CodeDataTransfers.EDITORS, ...dndContributionKeys)) {
|
|
469
470
|
event.dataTransfer.dropEffect = 'none';
|
|
470
471
|
return;
|
|
@@ -513,11 +514,11 @@ let EditorDropTarget = class EditorDropTarget extends Themable {
|
|
|
513
514
|
}
|
|
514
515
|
}
|
|
515
516
|
};
|
|
516
|
-
EditorDropTarget = ( __decorate([
|
|
517
|
-
( __param(2, IEditorGroupsService)),
|
|
518
|
-
( __param(3, IThemeService)),
|
|
519
|
-
( __param(4, IConfigurationService)),
|
|
520
|
-
( __param(5, IInstantiationService))
|
|
521
|
-
], EditorDropTarget));
|
|
517
|
+
EditorDropTarget = ( (__decorate([
|
|
518
|
+
( (__param(2, IEditorGroupsService))),
|
|
519
|
+
( (__param(3, IThemeService))),
|
|
520
|
+
( (__param(4, IConfigurationService))),
|
|
521
|
+
( (__param(5, IInstantiationService)))
|
|
522
|
+
], EditorDropTarget)));
|
|
522
523
|
|
|
523
524
|
export { EditorDropTarget };
|
|
@@ -224,7 +224,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
224
224
|
if (typeof scope.location === 'number') {
|
|
225
225
|
return this.doFindGroupByLocation(scope.location, source, wrap);
|
|
226
226
|
}
|
|
227
|
-
throw new Error('invalid arguments');
|
|
227
|
+
throw ( new Error('invalid arguments'));
|
|
228
228
|
}
|
|
229
229
|
doFindGroupByDirection(direction, source, wrap) {
|
|
230
230
|
const sourceGroupView = this.assertGroupView(source);
|
|
@@ -581,7 +581,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
581
581
|
const sourceView = this.assertGroupView(group);
|
|
582
582
|
const targetView = this.assertGroupView(location);
|
|
583
583
|
if (sourceView.id === targetView.id) {
|
|
584
|
-
throw new Error('Cannot move group into its own');
|
|
584
|
+
throw ( new Error('Cannot move group into its own'));
|
|
585
585
|
}
|
|
586
586
|
const restoreFocus = this.shouldRestoreFocus(sourceView.element);
|
|
587
587
|
let movedView;
|
|
@@ -653,7 +653,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
653
653
|
groupView = group;
|
|
654
654
|
}
|
|
655
655
|
if (!groupView) {
|
|
656
|
-
throw new Error('Invalid editor group provided!');
|
|
656
|
+
throw ( new Error('Invalid editor group provided!'));
|
|
657
657
|
}
|
|
658
658
|
return groupView;
|
|
659
659
|
}
|
|
@@ -14,6 +14,7 @@ import { getWindow } from 'vscode/vscode/vs/base/browser/dom';
|
|
|
14
14
|
import { getZoomLevel } from 'vscode/vscode/vs/base/browser/browser';
|
|
15
15
|
|
|
16
16
|
var EditorParts_1;
|
|
17
|
+
const _moduleId = "vs/workbench/browser/parts/editor/editorParts";
|
|
17
18
|
let EditorParts = class EditorParts extends MultiWindowParts {
|
|
18
19
|
static { EditorParts_1 = this; }
|
|
19
20
|
constructor(instantiationService, storageService, themeService) {
|
|
@@ -21,29 +22,29 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
21
22
|
this.instantiationService = instantiationService;
|
|
22
23
|
this.mainPart = this._register(this.createMainEditorPart());
|
|
23
24
|
this.mostRecentActiveParts = [this.mainPart];
|
|
24
|
-
this._onDidCreateAuxiliaryEditorPart = this._register(( new Emitter()));
|
|
25
|
+
this._onDidCreateAuxiliaryEditorPart = this._register(( (new Emitter())));
|
|
25
26
|
this.onDidCreateAuxiliaryEditorPart = this._onDidCreateAuxiliaryEditorPart.event;
|
|
26
27
|
this.workspaceMemento = this.getMemento(1 , 0 );
|
|
27
28
|
this._isReady = false;
|
|
28
|
-
this.whenReadyPromise = ( new DeferredPromise());
|
|
29
|
+
this.whenReadyPromise = ( (new DeferredPromise()));
|
|
29
30
|
this.whenReady = this.whenReadyPromise.p;
|
|
30
|
-
this.whenRestoredPromise = ( new DeferredPromise());
|
|
31
|
+
this.whenRestoredPromise = ( (new DeferredPromise()));
|
|
31
32
|
this.whenRestored = this.whenRestoredPromise.p;
|
|
32
|
-
this._onDidActiveGroupChange = this._register(( new Emitter()));
|
|
33
|
+
this._onDidActiveGroupChange = this._register(( (new Emitter())));
|
|
33
34
|
this.onDidChangeActiveGroup = this._onDidActiveGroupChange.event;
|
|
34
|
-
this._onDidAddGroup = this._register(( new Emitter()));
|
|
35
|
+
this._onDidAddGroup = this._register(( (new Emitter())));
|
|
35
36
|
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
36
|
-
this._onDidRemoveGroup = this._register(( new Emitter()));
|
|
37
|
+
this._onDidRemoveGroup = this._register(( (new Emitter())));
|
|
37
38
|
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
38
|
-
this._onDidMoveGroup = this._register(( new Emitter()));
|
|
39
|
+
this._onDidMoveGroup = this._register(( (new Emitter())));
|
|
39
40
|
this.onDidMoveGroup = this._onDidMoveGroup.event;
|
|
40
|
-
this._onDidActivateGroup = this._register(( new Emitter()));
|
|
41
|
+
this._onDidActivateGroup = this._register(( (new Emitter())));
|
|
41
42
|
this.onDidActivateGroup = this._onDidActivateGroup.event;
|
|
42
|
-
this._onDidChangeGroupIndex = this._register(( new Emitter()));
|
|
43
|
+
this._onDidChangeGroupIndex = this._register(( (new Emitter())));
|
|
43
44
|
this.onDidChangeGroupIndex = this._onDidChangeGroupIndex.event;
|
|
44
|
-
this._onDidChangeGroupLocked = this._register(( new Emitter()));
|
|
45
|
+
this._onDidChangeGroupLocked = this._register(( (new Emitter())));
|
|
45
46
|
this.onDidChangeGroupLocked = this._onDidChangeGroupLocked.event;
|
|
46
|
-
this._onDidChangeGroupMaximized = this._register(( new Emitter()));
|
|
47
|
+
this._onDidChangeGroupMaximized = this._register(( (new Emitter())));
|
|
47
48
|
this.onDidChangeGroupMaximized = this._onDidChangeGroupMaximized.event;
|
|
48
49
|
this._register(this.registerPart(this.mainPart));
|
|
49
50
|
this.restoreParts();
|
|
@@ -58,12 +59,12 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
58
59
|
async createAuxiliaryEditorPart(options) {
|
|
59
60
|
const { part, instantiationService, disposables } = await this.instantiationService.createInstance(AuxiliaryEditorPart, this).create(this.getGroupsLabel(this._parts.size), options);
|
|
60
61
|
this._onDidAddGroup.fire(part.activeGroup);
|
|
61
|
-
const eventDisposables = disposables.add(( new DisposableStore()));
|
|
62
|
+
const eventDisposables = disposables.add(( (new DisposableStore())));
|
|
62
63
|
this._onDidCreateAuxiliaryEditorPart.fire({ part, instantiationService, disposables: eventDisposables });
|
|
63
64
|
return part;
|
|
64
65
|
}
|
|
65
66
|
registerPart(part) {
|
|
66
|
-
const disposables = this._register(( new DisposableStore()));
|
|
67
|
+
const disposables = this._register(( (new DisposableStore())));
|
|
67
68
|
disposables.add(super.registerPart(part));
|
|
68
69
|
this.registerEditorPartListeners(part, disposables);
|
|
69
70
|
return disposables;
|
|
@@ -104,12 +105,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
107
|
getGroupsLabel(index) {
|
|
107
|
-
return ( localizeWithPath(
|
|
108
|
-
'vs/workbench/browser/parts/editor/editorParts',
|
|
109
|
-
'groupLabel',
|
|
110
|
-
"Window {0}",
|
|
111
|
-
index + 1
|
|
112
|
-
));
|
|
108
|
+
return ( localizeWithPath(_moduleId, 0, "Window {0}", index + 1));
|
|
113
109
|
}
|
|
114
110
|
getPart(groupOrElement) {
|
|
115
111
|
if (this._parts.size > 1) {
|
|
@@ -149,7 +145,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
149
145
|
mostRecentActivePart?.activeGroup.focus();
|
|
150
146
|
this._isReady = true;
|
|
151
147
|
this.whenReadyPromise.complete();
|
|
152
|
-
await Promise.allSettled(( this.parts.map(part => part.whenRestored)));
|
|
148
|
+
await Promise.allSettled(( (this.parts.map(part => part.whenRestored))));
|
|
153
149
|
this.whenRestoredPromise.complete();
|
|
154
150
|
}
|
|
155
151
|
loadState() {
|
|
@@ -166,7 +162,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
166
162
|
}
|
|
167
163
|
createState() {
|
|
168
164
|
return {
|
|
169
|
-
auxiliary: ( this.parts.filter(part => part !== this.mainPart).map(part => {
|
|
165
|
+
auxiliary: ( (this.parts.filter(part => part !== this.mainPart).map(part => {
|
|
170
166
|
return {
|
|
171
167
|
state: part.createState(),
|
|
172
168
|
bounds: (() => {
|
|
@@ -189,8 +185,8 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
189
185
|
return undefined;
|
|
190
186
|
})()
|
|
191
187
|
};
|
|
192
|
-
})),
|
|
193
|
-
mru: ( this.mostRecentActiveParts.map(part => this.parts.indexOf(part)))
|
|
188
|
+
}))),
|
|
189
|
+
mru: ( (this.mostRecentActiveParts.map(part => this.parts.indexOf(part))))
|
|
194
190
|
};
|
|
195
191
|
}
|
|
196
192
|
async restoreState(state) {
|
|
@@ -205,16 +201,18 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
205
201
|
}
|
|
206
202
|
await Promise.allSettled(auxiliaryEditorPartPromises);
|
|
207
203
|
if (state.mru.length === this.parts.length) {
|
|
208
|
-
this.mostRecentActiveParts = ( state.mru.map(index => this.parts[index]));
|
|
204
|
+
this.mostRecentActiveParts = ( (state.mru.map(index => this.parts[index])));
|
|
209
205
|
}
|
|
210
206
|
else {
|
|
211
207
|
this.mostRecentActiveParts = [...this.parts];
|
|
212
208
|
}
|
|
213
|
-
await Promise.allSettled(( this.parts.map(part => part.whenReady)));
|
|
209
|
+
await Promise.allSettled(( (this.parts.map(part => part.whenReady))));
|
|
214
210
|
}
|
|
215
211
|
}
|
|
216
212
|
get hasRestorableState() {
|
|
217
|
-
return (
|
|
213
|
+
return (
|
|
214
|
+
(this.parts.some(part => part.hasRestorableState))
|
|
215
|
+
);
|
|
218
216
|
}
|
|
219
217
|
onDidChangeMementoState(e) {
|
|
220
218
|
if (e.external && e.scope === 1 ) {
|
|
@@ -265,7 +263,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
265
263
|
parts = distinct([...this.mostRecentActiveParts, ...this.parts]);
|
|
266
264
|
break;
|
|
267
265
|
}
|
|
268
|
-
return ( parts.map(part => part.getGroups(order))).flat();
|
|
266
|
+
return ( (parts.map(part => part.getGroups(order)))).flat();
|
|
269
267
|
}
|
|
270
268
|
return this.mainPart.getGroups(order);
|
|
271
269
|
}
|
|
@@ -289,7 +287,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
289
287
|
groupView = group;
|
|
290
288
|
}
|
|
291
289
|
if (!groupView) {
|
|
292
|
-
throw new Error('Invalid editor group provided!');
|
|
290
|
+
throw ( (new Error('Invalid editor group provided!')));
|
|
293
291
|
}
|
|
294
292
|
return groupView;
|
|
295
293
|
}
|
|
@@ -382,10 +380,10 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
382
380
|
get partOptions() { return this.mainPart.partOptions; }
|
|
383
381
|
get onDidChangeEditorPartOptions() { return this.mainPart.onDidChangeEditorPartOptions; }
|
|
384
382
|
};
|
|
385
|
-
EditorParts = EditorParts_1 = ( __decorate([
|
|
386
|
-
( __param(0, IInstantiationService)),
|
|
387
|
-
( __param(1, IStorageService)),
|
|
388
|
-
( __param(2, IThemeService))
|
|
389
|
-
], EditorParts));
|
|
383
|
+
EditorParts = EditorParts_1 = ( (__decorate([
|
|
384
|
+
( (__param(0, IInstantiationService))),
|
|
385
|
+
( (__param(1, IStorageService))),
|
|
386
|
+
( (__param(2, IThemeService)))
|
|
387
|
+
], EditorParts)));
|
|
390
388
|
|
|
391
389
|
export { EditorParts };
|