@codingame/monaco-vscode-view-common-service-override 4.5.1 → 5.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/package.json +3 -3
- package/viewCommon.js +3 -6
- 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 +142 -221
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +49 -45
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -30
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -138
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +25 -38
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +26 -27
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +20 -34
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +7 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -765
- 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 +54 -19
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +122 -72
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +51 -54
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +44 -44
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +25 -26
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +22 -22
- 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 +59 -88
- 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 +39 -113
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +13 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +35 -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 +41 -43
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +6 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +13 -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/webview/browser/webviewFindWidget.js +5 -3
- 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/webviewViewPane.js +13 -11
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +2 -2
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +79 -49
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +9 -7
- 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
|
@@ -10,40 +10,50 @@ import { MultiWindowParts } from 'vscode/vscode/vs/workbench/browser/part';
|
|
|
10
10
|
import { DeferredPromise } from 'vscode/vscode/vs/base/common/async';
|
|
11
11
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
12
12
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { IAuxiliaryWindowService } from 'vscode/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.service';
|
|
14
|
+
import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
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
|
-
constructor(instantiationService, storageService, themeService) {
|
|
20
|
+
constructor(instantiationService, storageService, themeService, auxiliaryWindowService) {
|
|
20
21
|
super('workbench.editorParts', themeService, storageService);
|
|
21
22
|
this.instantiationService = instantiationService;
|
|
23
|
+
this.storageService = storageService;
|
|
24
|
+
this.auxiliaryWindowService = auxiliaryWindowService;
|
|
22
25
|
this.mainPart = this._register(this.createMainEditorPart());
|
|
23
26
|
this.mostRecentActiveParts = [this.mainPart];
|
|
24
|
-
this._onDidCreateAuxiliaryEditorPart = this._register(( new Emitter()));
|
|
27
|
+
this._onDidCreateAuxiliaryEditorPart = this._register(( (new Emitter())));
|
|
25
28
|
this.onDidCreateAuxiliaryEditorPart = this._onDidCreateAuxiliaryEditorPart.event;
|
|
26
29
|
this.workspaceMemento = this.getMemento(1 , 0 );
|
|
27
30
|
this._isReady = false;
|
|
28
|
-
this.whenReadyPromise = ( new DeferredPromise());
|
|
31
|
+
this.whenReadyPromise = ( (new DeferredPromise()));
|
|
29
32
|
this.whenReady = this.whenReadyPromise.p;
|
|
30
|
-
this.whenRestoredPromise = ( new DeferredPromise());
|
|
33
|
+
this.whenRestoredPromise = ( (new DeferredPromise()));
|
|
31
34
|
this.whenRestored = this.whenRestoredPromise.p;
|
|
32
|
-
this.
|
|
35
|
+
this.editorWorkingSets = (() => {
|
|
36
|
+
const workingSetsRaw = this.storageService.get(EditorParts_1.EDITOR_WORKING_SETS_STORAGE_KEY, 1 );
|
|
37
|
+
if (workingSetsRaw) {
|
|
38
|
+
return JSON.parse(workingSetsRaw);
|
|
39
|
+
}
|
|
40
|
+
return [];
|
|
41
|
+
})();
|
|
42
|
+
this._onDidActiveGroupChange = this._register(( (new Emitter())));
|
|
33
43
|
this.onDidChangeActiveGroup = this._onDidActiveGroupChange.event;
|
|
34
|
-
this._onDidAddGroup = this._register(( new Emitter()));
|
|
44
|
+
this._onDidAddGroup = this._register(( (new Emitter())));
|
|
35
45
|
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
36
|
-
this._onDidRemoveGroup = this._register(( new Emitter()));
|
|
46
|
+
this._onDidRemoveGroup = this._register(( (new Emitter())));
|
|
37
47
|
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
38
|
-
this._onDidMoveGroup = this._register(( new Emitter()));
|
|
48
|
+
this._onDidMoveGroup = this._register(( (new Emitter())));
|
|
39
49
|
this.onDidMoveGroup = this._onDidMoveGroup.event;
|
|
40
|
-
this._onDidActivateGroup = this._register(( new Emitter()));
|
|
50
|
+
this._onDidActivateGroup = this._register(( (new Emitter())));
|
|
41
51
|
this.onDidActivateGroup = this._onDidActivateGroup.event;
|
|
42
|
-
this._onDidChangeGroupIndex = this._register(( new Emitter()));
|
|
52
|
+
this._onDidChangeGroupIndex = this._register(( (new Emitter())));
|
|
43
53
|
this.onDidChangeGroupIndex = this._onDidChangeGroupIndex.event;
|
|
44
|
-
this._onDidChangeGroupLocked = this._register(( new Emitter()));
|
|
54
|
+
this._onDidChangeGroupLocked = this._register(( (new Emitter())));
|
|
45
55
|
this.onDidChangeGroupLocked = this._onDidChangeGroupLocked.event;
|
|
46
|
-
this._onDidChangeGroupMaximized = this._register(( new Emitter()));
|
|
56
|
+
this._onDidChangeGroupMaximized = this._register(( (new Emitter())));
|
|
47
57
|
this.onDidChangeGroupMaximized = this._onDidChangeGroupMaximized.event;
|
|
48
58
|
this._register(this.registerPart(this.mainPart));
|
|
49
59
|
this.restoreParts();
|
|
@@ -58,12 +68,12 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
58
68
|
async createAuxiliaryEditorPart(options) {
|
|
59
69
|
const { part, instantiationService, disposables } = await this.instantiationService.createInstance(AuxiliaryEditorPart, this).create(this.getGroupsLabel(this._parts.size), options);
|
|
60
70
|
this._onDidAddGroup.fire(part.activeGroup);
|
|
61
|
-
const eventDisposables = disposables.add(( new DisposableStore()));
|
|
71
|
+
const eventDisposables = disposables.add(( (new DisposableStore())));
|
|
62
72
|
this._onDidCreateAuxiliaryEditorPart.fire({ part, instantiationService, disposables: eventDisposables });
|
|
63
73
|
return part;
|
|
64
74
|
}
|
|
65
75
|
registerPart(part) {
|
|
66
|
-
const disposables = this._register(( new DisposableStore()));
|
|
76
|
+
const disposables = this._register(( (new DisposableStore())));
|
|
67
77
|
disposables.add(super.registerPart(part));
|
|
68
78
|
this.registerEditorPartListeners(part, disposables);
|
|
69
79
|
return disposables;
|
|
@@ -104,12 +114,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
104
114
|
}
|
|
105
115
|
}
|
|
106
116
|
getGroupsLabel(index) {
|
|
107
|
-
return ( localizeWithPath(
|
|
108
|
-
'vs/workbench/browser/parts/editor/editorParts',
|
|
109
|
-
'groupLabel',
|
|
110
|
-
"Window {0}",
|
|
111
|
-
index + 1
|
|
112
|
-
));
|
|
117
|
+
return ( localizeWithPath(_moduleId, 0, "Window {0}", index + 1));
|
|
113
118
|
}
|
|
114
119
|
getPart(groupOrElement) {
|
|
115
120
|
if (this._parts.size > 1) {
|
|
@@ -149,7 +154,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
149
154
|
mostRecentActivePart?.activeGroup.focus();
|
|
150
155
|
this._isReady = true;
|
|
151
156
|
this.whenReadyPromise.complete();
|
|
152
|
-
await Promise.allSettled(( this.parts.map(part => part.whenRestored)));
|
|
157
|
+
await Promise.allSettled(( (this.parts.map(part => part.whenRestored))));
|
|
153
158
|
this.whenRestoredPromise.complete();
|
|
154
159
|
}
|
|
155
160
|
loadState() {
|
|
@@ -166,55 +171,36 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
166
171
|
}
|
|
167
172
|
createState() {
|
|
168
173
|
return {
|
|
169
|
-
auxiliary: ( this.parts.filter(part => part !== this.mainPart).map(part => {
|
|
174
|
+
auxiliary: ( (this.parts.filter(part => part !== this.mainPart).map(part => {
|
|
175
|
+
const auxiliaryWindow = this.auxiliaryWindowService.getWindow(part.windowId);
|
|
170
176
|
return {
|
|
171
177
|
state: part.createState(),
|
|
172
|
-
|
|
173
|
-
const auxiliaryWindow = getWindow(part.getContainer());
|
|
174
|
-
if (auxiliaryWindow) {
|
|
175
|
-
return {
|
|
176
|
-
x: auxiliaryWindow.screenX,
|
|
177
|
-
y: auxiliaryWindow.screenY,
|
|
178
|
-
width: auxiliaryWindow.outerWidth,
|
|
179
|
-
height: auxiliaryWindow.outerHeight
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
return undefined;
|
|
183
|
-
})(),
|
|
184
|
-
zoomLevel: (() => {
|
|
185
|
-
const auxiliaryWindow = getWindow(part.getContainer());
|
|
186
|
-
if (auxiliaryWindow) {
|
|
187
|
-
return getZoomLevel(auxiliaryWindow);
|
|
188
|
-
}
|
|
189
|
-
return undefined;
|
|
190
|
-
})()
|
|
178
|
+
...auxiliaryWindow?.createState()
|
|
191
179
|
};
|
|
192
|
-
})),
|
|
193
|
-
mru: ( this.mostRecentActiveParts.map(part => this.parts.indexOf(part)))
|
|
180
|
+
}))),
|
|
181
|
+
mru: ( (this.mostRecentActiveParts.map(part => this.parts.indexOf(part))))
|
|
194
182
|
};
|
|
195
183
|
}
|
|
196
184
|
async restoreState(state) {
|
|
197
185
|
if (state.auxiliary.length) {
|
|
198
186
|
const auxiliaryEditorPartPromises = [];
|
|
199
187
|
for (const auxiliaryEditorPartState of state.auxiliary) {
|
|
200
|
-
auxiliaryEditorPartPromises.push(this.createAuxiliaryEditorPart(
|
|
201
|
-
bounds: auxiliaryEditorPartState.bounds,
|
|
202
|
-
state: auxiliaryEditorPartState.state,
|
|
203
|
-
zoomLevel: auxiliaryEditorPartState.zoomLevel
|
|
204
|
-
}));
|
|
188
|
+
auxiliaryEditorPartPromises.push(this.createAuxiliaryEditorPart(auxiliaryEditorPartState));
|
|
205
189
|
}
|
|
206
190
|
await Promise.allSettled(auxiliaryEditorPartPromises);
|
|
207
191
|
if (state.mru.length === this.parts.length) {
|
|
208
|
-
this.mostRecentActiveParts = ( state.mru.map(index => this.parts[index]));
|
|
192
|
+
this.mostRecentActiveParts = ( (state.mru.map(index => this.parts[index])));
|
|
209
193
|
}
|
|
210
194
|
else {
|
|
211
195
|
this.mostRecentActiveParts = [...this.parts];
|
|
212
196
|
}
|
|
213
|
-
await Promise.allSettled(( this.parts.map(part => part.whenReady)));
|
|
197
|
+
await Promise.allSettled(( (this.parts.map(part => part.whenReady))));
|
|
214
198
|
}
|
|
215
199
|
}
|
|
216
200
|
get hasRestorableState() {
|
|
217
|
-
return (
|
|
201
|
+
return (
|
|
202
|
+
(this.parts.some(part => part.hasRestorableState))
|
|
203
|
+
);
|
|
218
204
|
}
|
|
219
205
|
onDidChangeMementoState(e) {
|
|
220
206
|
if (e.external && e.scope === 1 ) {
|
|
@@ -231,16 +217,79 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
231
217
|
continue;
|
|
232
218
|
}
|
|
233
219
|
for (const group of part.getGroups(1 )) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
220
|
+
await group.closeAllEditors({ excludeConfirming: true });
|
|
221
|
+
}
|
|
222
|
+
const closed = part.close();
|
|
223
|
+
if (!closed) {
|
|
224
|
+
return false;
|
|
238
225
|
}
|
|
239
|
-
part.close();
|
|
240
226
|
}
|
|
241
|
-
|
|
227
|
+
if (state !== 'empty') {
|
|
228
|
+
await this.restoreState(state);
|
|
229
|
+
}
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
static { this.EDITOR_WORKING_SETS_STORAGE_KEY = 'editor.workingSets'; }
|
|
233
|
+
saveWorkingSet(name) {
|
|
234
|
+
const workingSet = {
|
|
235
|
+
id: generateUuid(),
|
|
236
|
+
name,
|
|
237
|
+
main: this.mainPart.createState(),
|
|
238
|
+
auxiliary: this.createState()
|
|
239
|
+
};
|
|
240
|
+
this.editorWorkingSets.push(workingSet);
|
|
241
|
+
this.saveWorkingSets();
|
|
242
|
+
return {
|
|
243
|
+
id: workingSet.id,
|
|
244
|
+
name: workingSet.name
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
getWorkingSets() {
|
|
248
|
+
return (
|
|
249
|
+
(this.editorWorkingSets.map(workingSet => ({ id: workingSet.id, name: workingSet.name })))
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
deleteWorkingSet(workingSet) {
|
|
253
|
+
const index = this.indexOfWorkingSet(workingSet);
|
|
254
|
+
if (typeof index === 'number') {
|
|
255
|
+
this.editorWorkingSets.splice(index, 1);
|
|
256
|
+
this.saveWorkingSets();
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
async applyWorkingSet(workingSet) {
|
|
260
|
+
let workingSetState;
|
|
261
|
+
if (workingSet === 'empty') {
|
|
262
|
+
workingSetState = 'empty';
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
workingSetState = this.editorWorkingSets[this.indexOfWorkingSet(workingSet) ?? -1];
|
|
266
|
+
}
|
|
267
|
+
if (!workingSetState) {
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
270
|
+
const applied = await this.applyState(workingSetState === 'empty' ? workingSetState : workingSetState.auxiliary);
|
|
271
|
+
if (!applied) {
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
await this.mainPart.applyState(workingSetState === 'empty' ? workingSetState : workingSetState.main);
|
|
275
|
+
const mostRecentActivePart = firstOrDefault(this.mostRecentActiveParts);
|
|
276
|
+
if (mostRecentActivePart) {
|
|
277
|
+
await mostRecentActivePart.whenReady;
|
|
278
|
+
mostRecentActivePart.activeGroup.focus();
|
|
279
|
+
}
|
|
242
280
|
return true;
|
|
243
281
|
}
|
|
282
|
+
indexOfWorkingSet(workingSet) {
|
|
283
|
+
for (let i = 0; i < this.editorWorkingSets.length; i++) {
|
|
284
|
+
if (this.editorWorkingSets[i].id === workingSet.id) {
|
|
285
|
+
return i;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return undefined;
|
|
289
|
+
}
|
|
290
|
+
saveWorkingSets() {
|
|
291
|
+
this.storageService.store(EditorParts_1.EDITOR_WORKING_SETS_STORAGE_KEY, JSON.stringify(this.editorWorkingSets), 1 , 1 );
|
|
292
|
+
}
|
|
244
293
|
get activeGroup() {
|
|
245
294
|
return this.activePart.activeGroup;
|
|
246
295
|
}
|
|
@@ -265,7 +314,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
265
314
|
parts = distinct([...this.mostRecentActiveParts, ...this.parts]);
|
|
266
315
|
break;
|
|
267
316
|
}
|
|
268
|
-
return ( parts.map(part => part.getGroups(order))).flat();
|
|
317
|
+
return ( (parts.map(part => part.getGroups(order)))).flat();
|
|
269
318
|
}
|
|
270
319
|
return this.mainPart.getGroups(order);
|
|
271
320
|
}
|
|
@@ -289,7 +338,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
289
338
|
groupView = group;
|
|
290
339
|
}
|
|
291
340
|
if (!groupView) {
|
|
292
|
-
throw new Error('Invalid editor group provided!');
|
|
341
|
+
throw ( (new Error('Invalid editor group provided!')));
|
|
293
342
|
}
|
|
294
343
|
return groupView;
|
|
295
344
|
}
|
|
@@ -302,14 +351,14 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
302
351
|
setSize(group, size) {
|
|
303
352
|
this.getPart(group).setSize(group, size);
|
|
304
353
|
}
|
|
305
|
-
arrangeGroups(arrangement, group) {
|
|
306
|
-
|
|
354
|
+
arrangeGroups(arrangement, group = this.activePart.activeGroup) {
|
|
355
|
+
this.getPart(group).arrangeGroups(arrangement, group);
|
|
307
356
|
}
|
|
308
|
-
toggleMaximizeGroup(group) {
|
|
309
|
-
|
|
357
|
+
toggleMaximizeGroup(group = this.activePart.activeGroup) {
|
|
358
|
+
this.getPart(group).toggleMaximizeGroup(group);
|
|
310
359
|
}
|
|
311
|
-
toggleExpandGroup(group) {
|
|
312
|
-
|
|
360
|
+
toggleExpandGroup(group = this.activePart.activeGroup) {
|
|
361
|
+
this.getPart(group).toggleExpandGroup(group);
|
|
313
362
|
}
|
|
314
363
|
restoreGroup(group) {
|
|
315
364
|
return this.getPart(group).restoreGroup(group);
|
|
@@ -382,10 +431,11 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
382
431
|
get partOptions() { return this.mainPart.partOptions; }
|
|
383
432
|
get onDidChangeEditorPartOptions() { return this.mainPart.onDidChangeEditorPartOptions; }
|
|
384
433
|
};
|
|
385
|
-
EditorParts = EditorParts_1 = ( __decorate([
|
|
386
|
-
( __param(0, IInstantiationService)),
|
|
387
|
-
( __param(1, IStorageService)),
|
|
388
|
-
( __param(2, IThemeService))
|
|
389
|
-
|
|
434
|
+
EditorParts = EditorParts_1 = ( (__decorate([
|
|
435
|
+
( (__param(0, IInstantiationService))),
|
|
436
|
+
( (__param(1, IStorageService))),
|
|
437
|
+
( (__param(2, IThemeService))),
|
|
438
|
+
( (__param(3, IAuxiliaryWindowService)))
|
|
439
|
+
], EditorParts)));
|
|
390
440
|
|
|
391
441
|
export { EditorParts };
|
|
@@ -23,6 +23,7 @@ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/te
|
|
|
23
23
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
24
24
|
|
|
25
25
|
var ViewContainerActivityAction_1;
|
|
26
|
+
const _moduleId = "vs/workbench/browser/parts/paneCompositeBar";
|
|
26
27
|
let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
27
28
|
constructor(options, part, paneCompositePart, instantiationService, storageService, extensionService, viewDescriptorService, contextKeyService, environmentService, layoutService) {
|
|
28
29
|
super();
|
|
@@ -36,29 +37,29 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
36
37
|
this.contextKeyService = contextKeyService;
|
|
37
38
|
this.environmentService = environmentService;
|
|
38
39
|
this.layoutService = layoutService;
|
|
39
|
-
this.viewContainerDisposables = this._register(( new DisposableMap()));
|
|
40
|
-
this.compositeActions = ( new Map());
|
|
40
|
+
this.viewContainerDisposables = this._register(( (new DisposableMap())));
|
|
41
|
+
this.compositeActions = ( (new Map()));
|
|
41
42
|
this.hasExtensionsRegistered = false;
|
|
42
43
|
this._cachedViewContainers = undefined;
|
|
43
44
|
this.location = paneCompositePart.partId === "workbench.parts.panel"
|
|
44
45
|
? 1 : paneCompositePart.partId === "workbench.parts.auxiliarybar"
|
|
45
46
|
? 2 : 0 ;
|
|
46
|
-
this.dndHandler = ( new CompositeDragAndDrop(
|
|
47
|
+
this.dndHandler = ( (new CompositeDragAndDrop(
|
|
47
48
|
this.viewDescriptorService,
|
|
48
49
|
this.location,
|
|
49
50
|
this.options.orientation,
|
|
50
51
|
async (id, focus) => { return (await this.paneCompositePart.openPaneComposite(id, focus)) ?? null; },
|
|
51
52
|
(from, to, before) => this.compositeBar.move(from, to, this.options.orientation === 1 ? before?.verticallyBefore : before?.horizontallyBefore),
|
|
52
53
|
() => this.compositeBar.getCompositeBarItems()
|
|
53
|
-
));
|
|
54
|
-
const cachedItems = ( this.cachedViewContainers
|
|
54
|
+
)));
|
|
55
|
+
const cachedItems = ( (this.cachedViewContainers
|
|
55
56
|
.map(container => ({
|
|
56
57
|
id: container.id,
|
|
57
58
|
name: container.name,
|
|
58
59
|
visible: !this.shouldBeHidden(container.id, container),
|
|
59
60
|
order: container.order,
|
|
60
61
|
pinned: container.pinned,
|
|
61
|
-
})));
|
|
62
|
+
}))));
|
|
62
63
|
this.compositeBar = this.createCompositeBar(cachedItems);
|
|
63
64
|
this.onDidRegisterViewContainers(this.getViewContainers());
|
|
64
65
|
this.registerListeners();
|
|
@@ -91,11 +92,7 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
91
92
|
const viewContainer = this.viewDescriptorService.getViewContainerById(compositeId);
|
|
92
93
|
const defaultLocation = this.viewDescriptorService.getDefaultViewContainerLocation(viewContainer);
|
|
93
94
|
if (defaultLocation !== this.viewDescriptorService.getViewContainerLocation(viewContainer)) {
|
|
94
|
-
actions.push(toAction({ id: 'resetLocationAction', label: ( localizeWithPath(
|
|
95
|
-
'vs/workbench/browser/parts/paneCompositeBar',
|
|
96
|
-
'resetLocation',
|
|
97
|
-
"Reset Location"
|
|
98
|
-
)), run: () => this.viewDescriptorService.moveViewContainerToLocation(viewContainer, defaultLocation, undefined, 'resetLocationAction') }));
|
|
95
|
+
actions.push(toAction({ id: 'resetLocationAction', label: ( localizeWithPath(_moduleId, 0, "Reset Location")), run: () => this.viewDescriptorService.moveViewContainerToLocation(viewContainer, defaultLocation, undefined, 'resetLocationAction') }));
|
|
99
96
|
}
|
|
100
97
|
else {
|
|
101
98
|
const viewContainerModel = this.viewDescriptorService.getViewContainerModel(viewContainer);
|
|
@@ -103,11 +100,7 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
103
100
|
const viewToReset = viewContainerModel.allViewDescriptors[0];
|
|
104
101
|
const defaultContainer = this.viewDescriptorService.getDefaultContainerById(viewToReset.id);
|
|
105
102
|
if (defaultContainer !== viewContainer) {
|
|
106
|
-
actions.push(toAction({ id: 'resetLocationAction', label: ( localizeWithPath(
|
|
107
|
-
'vs/workbench/browser/parts/paneCompositeBar',
|
|
108
|
-
'resetLocation',
|
|
109
|
-
"Reset Location"
|
|
110
|
-
)), run: () => this.viewDescriptorService.moveViewsToContainer([viewToReset], defaultContainer, undefined, 'resetLocationAction') }));
|
|
103
|
+
actions.push(toAction({ id: 'resetLocationAction', label: ( localizeWithPath(_moduleId, 0, "Reset Location")), run: () => this.viewDescriptorService.moveViewsToContainer([viewToReset], defaultContainer, undefined, 'resetLocationAction') }));
|
|
111
104
|
}
|
|
112
105
|
}
|
|
113
106
|
}
|
|
@@ -129,7 +122,7 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
129
122
|
}
|
|
130
123
|
onDidChangeViewContainers(added, removed) {
|
|
131
124
|
removed.filter(({ location }) => location === this.location).forEach(({ container }) => this.onDidDeregisterViewContainer(container));
|
|
132
|
-
this.onDidRegisterViewContainers(( added.filter(({ location }) => location === this.location).map(({ container }) => container)));
|
|
125
|
+
this.onDidRegisterViewContainers(( (added.filter(({ location }) => location === this.location).map(({ container }) => container))));
|
|
133
126
|
}
|
|
134
127
|
onDidChangeViewContainerLocation(container, from, to) {
|
|
135
128
|
if (from === this.location) {
|
|
@@ -189,16 +182,16 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
189
182
|
const viewContainerModel = this.viewDescriptorService.getViewContainerModel(viewContainer);
|
|
190
183
|
compositeActions = {
|
|
191
184
|
activityAction: this._register(this.instantiationService.createInstance(ViewContainerActivityAction, this.toCompositeBarActionItemFrom(viewContainerModel), this.part, this.paneCompositePart)),
|
|
192
|
-
pinnedAction: this._register(( new ToggleCompositePinnedAction(this.toCompositeBarActionItemFrom(viewContainerModel), this.compositeBar))),
|
|
193
|
-
badgeAction: this._register(( new ToggleCompositeBadgeAction(this.toCompositeBarActionItemFrom(viewContainerModel), this.compositeBar)))
|
|
185
|
+
pinnedAction: this._register(( (new ToggleCompositePinnedAction(this.toCompositeBarActionItemFrom(viewContainerModel), this.compositeBar)))),
|
|
186
|
+
badgeAction: this._register(( (new ToggleCompositeBadgeAction(this.toCompositeBarActionItemFrom(viewContainerModel), this.compositeBar))))
|
|
194
187
|
};
|
|
195
188
|
}
|
|
196
189
|
else {
|
|
197
190
|
const cachedComposite = this.cachedViewContainers.filter(c => c.id === compositeId)[0];
|
|
198
191
|
compositeActions = {
|
|
199
192
|
activityAction: this._register(this.instantiationService.createInstance(PlaceHolderViewContainerActivityAction, this.toCompositeBarActionItem(compositeId, cachedComposite?.name ?? compositeId, cachedComposite?.icon, undefined), this.part, this.paneCompositePart)),
|
|
200
|
-
pinnedAction: this._register(( new PlaceHolderToggleCompositePinnedAction(compositeId, this.compositeBar))),
|
|
201
|
-
badgeAction: this._register(( new PlaceHolderToggleCompositeBadgeAction(compositeId, this.compositeBar)))
|
|
193
|
+
pinnedAction: this._register(( (new PlaceHolderToggleCompositePinnedAction(compositeId, this.compositeBar)))),
|
|
194
|
+
badgeAction: this._register(( (new PlaceHolderToggleCompositeBadgeAction(compositeId, this.compositeBar))))
|
|
202
195
|
};
|
|
203
196
|
}
|
|
204
197
|
this.compositeActions.set(compositeId, compositeActions);
|
|
@@ -219,7 +212,7 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
219
212
|
const viewContainerModel = this.viewDescriptorService.getViewContainerModel(viewContainer);
|
|
220
213
|
this.updateCompositeBarActionItem(viewContainer, viewContainerModel);
|
|
221
214
|
this.showOrHideViewContainer(viewContainer);
|
|
222
|
-
const disposables = ( new DisposableStore());
|
|
215
|
+
const disposables = ( (new DisposableStore()));
|
|
223
216
|
disposables.add(viewContainerModel.onDidChangeContainerInfo(() => this.updateCompositeBarActionItem(viewContainer, viewContainerModel)));
|
|
224
217
|
disposables.add(viewContainerModel.onDidChangeActiveViewDescriptors(() => this.showOrHideViewContainer(viewContainer)));
|
|
225
218
|
this.viewContainerDisposables.set(viewContainer.id, disposables);
|
|
@@ -251,7 +244,7 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
251
244
|
if (URI.isUri(icon)) {
|
|
252
245
|
iconUrl = icon;
|
|
253
246
|
const cssUrl = asCSSUrl(icon);
|
|
254
|
-
const hash = ( new StringSHA1());
|
|
247
|
+
const hash = ( (new StringSHA1()));
|
|
255
248
|
hash.update(cssUrl);
|
|
256
249
|
const iconId = `activity-${id.replace(/\./g, '-')}-${hash.digest()}`;
|
|
257
250
|
const iconClass = `.monaco-workbench .${this.options.partContainerClass} .monaco-action-bar .action-label.${iconId}`;
|
|
@@ -325,16 +318,20 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
325
318
|
}
|
|
326
319
|
}
|
|
327
320
|
getPinnedPaneCompositeIds() {
|
|
328
|
-
const pinnedCompositeIds = ( this.compositeBar.getPinnedComposites().map(v => v.id));
|
|
329
|
-
return (
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
321
|
+
const pinnedCompositeIds = ( (this.compositeBar.getPinnedComposites().map(v => v.id)));
|
|
322
|
+
return (
|
|
323
|
+
(this.getViewContainers()
|
|
324
|
+
.filter(v => this.compositeBar.isPinned(v.id))
|
|
325
|
+
.sort((v1, v2) => pinnedCompositeIds.indexOf(v1.id) - pinnedCompositeIds.indexOf(v2.id))
|
|
326
|
+
.map(v => v.id))
|
|
327
|
+
);
|
|
333
328
|
}
|
|
334
329
|
getVisiblePaneCompositeIds() {
|
|
335
|
-
return (
|
|
336
|
-
|
|
337
|
-
|
|
330
|
+
return (
|
|
331
|
+
(this.compositeBar.getVisibleComposites()
|
|
332
|
+
.filter(v => this.paneCompositePart.getActivePaneComposite()?.getId() === v.id || this.compositeBar.isPinned(v.id))
|
|
333
|
+
.map(v => v.id))
|
|
334
|
+
);
|
|
338
335
|
}
|
|
339
336
|
getContextMenuActions() {
|
|
340
337
|
return this.compositeBar.getContextMenuActions();
|
|
@@ -343,7 +340,7 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
343
340
|
this.compositeBar.focus(index);
|
|
344
341
|
}
|
|
345
342
|
layout(width, height) {
|
|
346
|
-
this.compositeBar.layout(( new Dimension(width, height)));
|
|
343
|
+
this.compositeBar.layout(( (new Dimension(width, height))));
|
|
347
344
|
}
|
|
348
345
|
getViewContainer(id) {
|
|
349
346
|
const viewContainer = this.viewDescriptorService.getViewContainerById(id);
|
|
@@ -369,7 +366,7 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
369
366
|
});
|
|
370
367
|
}
|
|
371
368
|
for (const viewContainer of this.getViewContainers()) {
|
|
372
|
-
if (!( newCompositeItems.some(({ id }) => id === viewContainer.id))) {
|
|
369
|
+
if (!( (newCompositeItems.some(({ id }) => id === viewContainer.id)))) {
|
|
373
370
|
const index = compositeItems.findIndex(({ id }) => id === viewContainer.id);
|
|
374
371
|
if (index !== -1) {
|
|
375
372
|
const compositeItem = compositeItems[index];
|
|
@@ -451,24 +448,24 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
451
448
|
}
|
|
452
449
|
storeCachedViewContainersState(cachedViewContainers) {
|
|
453
450
|
const pinnedViewContainers = this.getPinnedViewContainers();
|
|
454
|
-
this.setPinnedViewContainers(( cachedViewContainers.map(({ id, pinned, order }) => ({
|
|
451
|
+
this.setPinnedViewContainers(( (cachedViewContainers.map(({ id, pinned, order }) => ({
|
|
455
452
|
id,
|
|
456
453
|
pinned,
|
|
457
454
|
visible: pinnedViewContainers.find(({ id: pinnedId }) => pinnedId === id)?.visible,
|
|
458
455
|
order
|
|
459
|
-
}))));
|
|
460
|
-
this.setPlaceholderViewContainers(( cachedViewContainers.map(({ id, icon, name, views, isBuiltin }) => ({
|
|
456
|
+
})))));
|
|
457
|
+
this.setPlaceholderViewContainers(( (cachedViewContainers.map(({ id, icon, name, views, isBuiltin }) => ({
|
|
461
458
|
id,
|
|
462
459
|
iconUrl: URI.isUri(icon) ? icon : undefined,
|
|
463
460
|
themeIcon: ThemeIcon.isThemeIcon(icon) ? icon : undefined,
|
|
464
461
|
name,
|
|
465
462
|
isBuiltin,
|
|
466
463
|
views
|
|
467
|
-
}))));
|
|
468
|
-
this.setViewContainersWorkspaceState(( cachedViewContainers.map(({ id, visible }) => ({
|
|
464
|
+
})))));
|
|
465
|
+
this.setViewContainersWorkspaceState(( (cachedViewContainers.map(({ id, visible }) => ({
|
|
469
466
|
id,
|
|
470
467
|
visible,
|
|
471
|
-
}))));
|
|
468
|
+
})))));
|
|
472
469
|
}
|
|
473
470
|
getPinnedViewContainers() {
|
|
474
471
|
return JSON.parse(this.pinnedViewContainersValue);
|
|
@@ -543,15 +540,15 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
543
540
|
this.storageService.store(this.options.viewContainersWorkspaceStateKey, value, 1 , 1 );
|
|
544
541
|
}
|
|
545
542
|
};
|
|
546
|
-
PaneCompositeBar = ( __decorate([
|
|
547
|
-
( __param(3, IInstantiationService)),
|
|
548
|
-
( __param(4, IStorageService)),
|
|
549
|
-
( __param(5, IExtensionService)),
|
|
550
|
-
( __param(6, IViewDescriptorService)),
|
|
551
|
-
( __param(7, IContextKeyService)),
|
|
552
|
-
( __param(8, IWorkbenchEnvironmentService)),
|
|
553
|
-
( __param(9, IWorkbenchLayoutService))
|
|
554
|
-
], PaneCompositeBar));
|
|
543
|
+
PaneCompositeBar = ( (__decorate([
|
|
544
|
+
( (__param(3, IInstantiationService))),
|
|
545
|
+
( (__param(4, IStorageService))),
|
|
546
|
+
( (__param(5, IExtensionService))),
|
|
547
|
+
( (__param(6, IViewDescriptorService))),
|
|
548
|
+
( (__param(7, IContextKeyService))),
|
|
549
|
+
( (__param(8, IWorkbenchEnvironmentService))),
|
|
550
|
+
( (__param(9, IWorkbenchLayoutService)))
|
|
551
|
+
], PaneCompositeBar)));
|
|
555
552
|
let ViewContainerActivityAction = class ViewContainerActivityAction extends CompositeBarAction {
|
|
556
553
|
static { ViewContainerActivityAction_1 = this; }
|
|
557
554
|
static { this.preventDoubleClickDelay = 300; }
|
|
@@ -615,12 +612,12 @@ let ViewContainerActivityAction = class ViewContainerActivityAction extends Comp
|
|
|
615
612
|
this.telemetryService.publicLog2('activityBarAction', { viewletId: this.compositeBarActionItem.id, action });
|
|
616
613
|
}
|
|
617
614
|
};
|
|
618
|
-
ViewContainerActivityAction = ViewContainerActivityAction_1 = ( __decorate([
|
|
619
|
-
( __param(3, IWorkbenchLayoutService)),
|
|
620
|
-
( __param(4, ITelemetryService)),
|
|
621
|
-
( __param(5, IConfigurationService)),
|
|
622
|
-
( __param(6, IActivityService))
|
|
623
|
-
], ViewContainerActivityAction));
|
|
615
|
+
ViewContainerActivityAction = ViewContainerActivityAction_1 = ( (__decorate([
|
|
616
|
+
( (__param(3, IWorkbenchLayoutService))),
|
|
617
|
+
( (__param(4, ITelemetryService))),
|
|
618
|
+
( (__param(5, IConfigurationService))),
|
|
619
|
+
( (__param(6, IActivityService)))
|
|
620
|
+
], ViewContainerActivityAction)));
|
|
624
621
|
class PlaceHolderViewContainerActivityAction extends ViewContainerActivityAction {
|
|
625
622
|
}
|
|
626
623
|
class PlaceHolderToggleCompositePinnedAction extends ToggleCompositePinnedAction {
|