@codingame/monaco-vscode-view-common-service-override 4.5.0 → 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/index.d.ts +1 -1
- 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
- package/viewCommon.d.ts +0 -5
|
@@ -44,6 +44,7 @@ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extension
|
|
|
44
44
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
45
45
|
|
|
46
46
|
var ActivitybarPart_1;
|
|
47
|
+
const _moduleId = "vs/workbench/browser/parts/activitybar/activitybarPart";
|
|
47
48
|
let ActivitybarPart = class ActivitybarPart extends Part {
|
|
48
49
|
static { ActivitybarPart_1 = this; }
|
|
49
50
|
static { this.ACTION_HEIGHT = 48; }
|
|
@@ -58,7 +59,7 @@ let ActivitybarPart = class ActivitybarPart extends Part {
|
|
|
58
59
|
this.maximumWidth = 48;
|
|
59
60
|
this.minimumHeight = 0;
|
|
60
61
|
this.maximumHeight = Number.POSITIVE_INFINITY;
|
|
61
|
-
this.compositeBar = this._register(( new MutableDisposable()));
|
|
62
|
+
this.compositeBar = this._register(( (new MutableDisposable())));
|
|
62
63
|
}
|
|
63
64
|
createCompositeBar() {
|
|
64
65
|
return this.instantiationService.createInstance(ActivityBarCompositeBar, {
|
|
@@ -153,12 +154,12 @@ let ActivitybarPart = class ActivitybarPart extends Part {
|
|
|
153
154
|
};
|
|
154
155
|
}
|
|
155
156
|
};
|
|
156
|
-
ActivitybarPart = ActivitybarPart_1 = ( __decorate([
|
|
157
|
-
( __param(1, IInstantiationService)),
|
|
158
|
-
( __param(2, IWorkbenchLayoutService)),
|
|
159
|
-
( __param(3, IThemeService)),
|
|
160
|
-
( __param(4, IStorageService))
|
|
161
|
-
], ActivitybarPart));
|
|
157
|
+
ActivitybarPart = ActivitybarPart_1 = ( (__decorate([
|
|
158
|
+
( (__param(1, IInstantiationService))),
|
|
159
|
+
( (__param(2, IWorkbenchLayoutService))),
|
|
160
|
+
( (__param(3, IThemeService))),
|
|
161
|
+
( (__param(4, IStorageService)))
|
|
162
|
+
], ActivitybarPart)));
|
|
162
163
|
let ActivityBarCompositeBar = class ActivityBarCompositeBar extends PaneCompositeBar {
|
|
163
164
|
constructor(options, part, paneCompositePart, showGlobalActivities, instantiationService, storageService, extensionService, viewDescriptorService, contextKeyService, environmentService, configurationService, menuService, layoutService) {
|
|
164
165
|
super({
|
|
@@ -170,7 +171,7 @@ let ActivityBarCompositeBar = class ActivityBarCompositeBar extends PaneComposit
|
|
|
170
171
|
}, part, paneCompositePart, instantiationService, storageService, extensionService, viewDescriptorService, contextKeyService, environmentService, layoutService);
|
|
171
172
|
this.configurationService = configurationService;
|
|
172
173
|
this.menuService = menuService;
|
|
173
|
-
this.keyboardNavigationDisposables = this._register(( new DisposableStore()));
|
|
174
|
+
this.keyboardNavigationDisposables = this._register(( (new DisposableStore())));
|
|
174
175
|
if (showGlobalActivities) {
|
|
175
176
|
this.globalCompositeBar = this._register(instantiationService.createInstance(GlobalCompositeBar, () => this.getContextMenuActions(), (theme) => this.options.colors(theme), this.options.activityHoverOptions));
|
|
176
177
|
}
|
|
@@ -188,22 +189,18 @@ let ActivityBarCompositeBar = class ActivityBarCompositeBar extends PaneComposit
|
|
|
188
189
|
fillContextMenuActions(actions, e) {
|
|
189
190
|
const menuBarVisibility = getMenuBarVisibility(this.configurationService);
|
|
190
191
|
if (menuBarVisibility === 'compact' || menuBarVisibility === 'hidden' || menuBarVisibility === 'toggle') {
|
|
191
|
-
actions.unshift(...[toAction({ id: 'toggleMenuVisibility', label: ( localizeWithPath(
|
|
192
|
+
actions.unshift(...[toAction({ id: 'toggleMenuVisibility', label: ( localizeWithPath(_moduleId, 0, "Menu")), checked: menuBarVisibility === 'compact', run: () => this.configurationService.updateValue('window.menuBarVisibility', menuBarVisibility === 'compact' ? 'toggle' : 'compact') }), ( (new Separator()))]);
|
|
192
193
|
}
|
|
193
194
|
if (menuBarVisibility === 'compact' && this.menuBarContainer && e?.target) {
|
|
194
195
|
if (isAncestor(e.target, this.menuBarContainer)) {
|
|
195
|
-
actions.unshift(...[toAction({ id: 'hideCompactMenu', label: ( localizeWithPath(
|
|
196
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
197
|
-
'hideMenu',
|
|
198
|
-
"Hide Menu"
|
|
199
|
-
)), run: () => this.configurationService.updateValue('window.menuBarVisibility', 'toggle') }), ( new Separator())]);
|
|
196
|
+
actions.unshift(...[toAction({ id: 'hideCompactMenu', label: ( localizeWithPath(_moduleId, 1, "Hide Menu")), run: () => this.configurationService.updateValue('window.menuBarVisibility', 'toggle') }), ( (new Separator()))]);
|
|
200
197
|
}
|
|
201
198
|
}
|
|
202
199
|
if (this.globalCompositeBar) {
|
|
203
|
-
actions.push(( new Separator()));
|
|
200
|
+
actions.push(( (new Separator())));
|
|
204
201
|
actions.push(...this.globalCompositeBar.getContextMenuActions());
|
|
205
202
|
}
|
|
206
|
-
actions.push(( new Separator()));
|
|
203
|
+
actions.push(( (new Separator())));
|
|
207
204
|
actions.push(...this.getActivityBarContextMenuActions());
|
|
208
205
|
}
|
|
209
206
|
uninstallMenubar() {
|
|
@@ -231,7 +228,7 @@ let ActivityBarCompositeBar = class ActivityBarCompositeBar extends PaneComposit
|
|
|
231
228
|
this.keyboardNavigationDisposables.clear();
|
|
232
229
|
if (this.menuBarContainer) {
|
|
233
230
|
this.keyboardNavigationDisposables.add(addDisposableListener(this.menuBarContainer, EventType.KEY_DOWN, e => {
|
|
234
|
-
const kbEvent = ( new StandardKeyboardEvent(e));
|
|
231
|
+
const kbEvent = ( (new StandardKeyboardEvent(e)));
|
|
235
232
|
if (kbEvent.equals(18 ) || kbEvent.equals(17 )) {
|
|
236
233
|
this.focus();
|
|
237
234
|
}
|
|
@@ -239,7 +236,7 @@ let ActivityBarCompositeBar = class ActivityBarCompositeBar extends PaneComposit
|
|
|
239
236
|
}
|
|
240
237
|
if (this.compositeBarContainer) {
|
|
241
238
|
this.keyboardNavigationDisposables.add(addDisposableListener(this.compositeBarContainer, EventType.KEY_DOWN, e => {
|
|
242
|
-
const kbEvent = ( new StandardKeyboardEvent(e));
|
|
239
|
+
const kbEvent = ( (new StandardKeyboardEvent(e)));
|
|
243
240
|
if (kbEvent.equals(18 ) || kbEvent.equals(17 )) {
|
|
244
241
|
this.globalCompositeBar?.focus();
|
|
245
242
|
}
|
|
@@ -250,7 +247,7 @@ let ActivityBarCompositeBar = class ActivityBarCompositeBar extends PaneComposit
|
|
|
250
247
|
}
|
|
251
248
|
if (this.globalCompositeBar) {
|
|
252
249
|
this.keyboardNavigationDisposables.add(addDisposableListener(this.globalCompositeBar.element, EventType.KEY_DOWN, e => {
|
|
253
|
-
const kbEvent = ( new StandardKeyboardEvent(e));
|
|
250
|
+
const kbEvent = ( (new StandardKeyboardEvent(e)));
|
|
254
251
|
if (kbEvent.equals(16 ) || kbEvent.equals(15 )) {
|
|
255
252
|
this.focus(this.getVisiblePaneCompositeIds().length - 1);
|
|
256
253
|
}
|
|
@@ -294,61 +291,45 @@ let ActivityBarCompositeBar = class ActivityBarCompositeBar extends PaneComposit
|
|
|
294
291
|
createAndFillInContextMenuActions(activityBarPositionMenu, { shouldForwardArgs: true, renderShortTitle: true }, { primary: [], secondary: positionActions });
|
|
295
292
|
activityBarPositionMenu.dispose();
|
|
296
293
|
return [
|
|
297
|
-
( new SubmenuAction('workbench.action.panel.position', ( localizeWithPath(
|
|
298
|
-
|
|
299
|
-
'activity bar position',
|
|
300
|
-
"Activity Bar Position"
|
|
301
|
-
)), positionActions)),
|
|
302
|
-
toAction({ id: ToggleSidebarPositionAction.ID, label: ToggleSidebarPositionAction.getLabel(this.layoutService), run: () => this.instantiationService.invokeFunction(accessor => ( new ToggleSidebarPositionAction()).run(accessor)) })
|
|
294
|
+
( (new SubmenuAction('workbench.action.panel.position', ( localizeWithPath(_moduleId, 2, "Activity Bar Position")), positionActions))),
|
|
295
|
+
toAction({ id: ToggleSidebarPositionAction.ID, label: ToggleSidebarPositionAction.getLabel(this.layoutService), run: () => this.instantiationService.invokeFunction(accessor => ( (new ToggleSidebarPositionAction())).run(accessor)) })
|
|
303
296
|
];
|
|
304
297
|
}
|
|
305
298
|
};
|
|
306
|
-
ActivityBarCompositeBar = ( __decorate([
|
|
307
|
-
( __param(4, IInstantiationService)),
|
|
308
|
-
( __param(5, IStorageService)),
|
|
309
|
-
( __param(6, IExtensionService)),
|
|
310
|
-
( __param(7, IViewDescriptorService)),
|
|
311
|
-
( __param(8, IContextKeyService)),
|
|
312
|
-
( __param(9, IWorkbenchEnvironmentService)),
|
|
313
|
-
( __param(10, IConfigurationService)),
|
|
314
|
-
( __param(11, IMenuService)),
|
|
315
|
-
( __param(12, IWorkbenchLayoutService))
|
|
316
|
-
], ActivityBarCompositeBar));
|
|
299
|
+
ActivityBarCompositeBar = ( (__decorate([
|
|
300
|
+
( (__param(4, IInstantiationService))),
|
|
301
|
+
( (__param(5, IStorageService))),
|
|
302
|
+
( (__param(6, IExtensionService))),
|
|
303
|
+
( (__param(7, IViewDescriptorService))),
|
|
304
|
+
( (__param(8, IContextKeyService))),
|
|
305
|
+
( (__param(9, IWorkbenchEnvironmentService))),
|
|
306
|
+
( (__param(10, IConfigurationService))),
|
|
307
|
+
( (__param(11, IMenuService))),
|
|
308
|
+
( (__param(12, IWorkbenchLayoutService)))
|
|
309
|
+
], ActivityBarCompositeBar)));
|
|
317
310
|
registerAction2(class extends Action2 {
|
|
318
311
|
constructor() {
|
|
319
312
|
super({
|
|
320
313
|
id: 'workbench.action.activityBarLocation.default',
|
|
321
314
|
title: {
|
|
322
|
-
...( localize2WithPath(
|
|
323
|
-
|
|
324
|
-
'positionActivityBarDefault',
|
|
325
|
-
'Move Activity Bar to Side'
|
|
326
|
-
)),
|
|
327
|
-
mnemonicTitle: ( localizeWithPath(
|
|
328
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
329
|
-
{ key: 'miDefaultActivityBar', comment: ['&& denotes a mnemonic'] },
|
|
330
|
-
"&&Default"
|
|
331
|
-
)),
|
|
315
|
+
...( localize2WithPath(_moduleId, 3, 'Move Activity Bar to Side')),
|
|
316
|
+
mnemonicTitle: ( localizeWithPath(_moduleId, 4, "&&Default")),
|
|
332
317
|
},
|
|
333
|
-
shortTitle: ( localizeWithPath(
|
|
334
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
335
|
-
'default',
|
|
336
|
-
"Default"
|
|
337
|
-
)),
|
|
318
|
+
shortTitle: ( localizeWithPath(_moduleId, 5, "Default")),
|
|
338
319
|
category: Categories.View,
|
|
339
|
-
toggled: ( ContextKeyExpr.equals(
|
|
320
|
+
toggled: ( (ContextKeyExpr.equals(
|
|
340
321
|
`config.${"workbench.activityBar.location" }`,
|
|
341
322
|
"default"
|
|
342
|
-
)),
|
|
323
|
+
))),
|
|
343
324
|
menu: [{
|
|
344
325
|
id: MenuId.ActivityBarPositionMenu,
|
|
345
326
|
order: 1
|
|
346
327
|
}, {
|
|
347
328
|
id: MenuId.CommandPalette,
|
|
348
|
-
when: ( ContextKeyExpr.notEquals(
|
|
329
|
+
when: ( (ContextKeyExpr.notEquals(
|
|
349
330
|
`config.${"workbench.activityBar.location" }`,
|
|
350
331
|
"default"
|
|
351
|
-
)),
|
|
332
|
+
))),
|
|
352
333
|
}]
|
|
353
334
|
});
|
|
354
335
|
}
|
|
@@ -362,32 +343,24 @@ registerAction2(class extends Action2 {
|
|
|
362
343
|
super({
|
|
363
344
|
id: 'workbench.action.activityBarLocation.top',
|
|
364
345
|
title: {
|
|
365
|
-
...( localize2WithPath(
|
|
366
|
-
|
|
367
|
-
'positionActivityBarTop',
|
|
368
|
-
'Move Activity Bar to Top'
|
|
369
|
-
)),
|
|
370
|
-
mnemonicTitle: ( localizeWithPath(
|
|
371
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
372
|
-
{ key: 'miTopActivityBar', comment: ['&& denotes a mnemonic'] },
|
|
373
|
-
"&&Top"
|
|
374
|
-
)),
|
|
346
|
+
...( localize2WithPath(_moduleId, 6, 'Move Activity Bar to Top')),
|
|
347
|
+
mnemonicTitle: ( localizeWithPath(_moduleId, 7, "&&Top")),
|
|
375
348
|
},
|
|
376
|
-
shortTitle: ( localizeWithPath(
|
|
349
|
+
shortTitle: ( localizeWithPath(_moduleId, 8, "Top")),
|
|
377
350
|
category: Categories.View,
|
|
378
|
-
toggled: ( ContextKeyExpr.equals(
|
|
351
|
+
toggled: ( (ContextKeyExpr.equals(
|
|
379
352
|
`config.${"workbench.activityBar.location" }`,
|
|
380
353
|
"top"
|
|
381
|
-
)),
|
|
354
|
+
))),
|
|
382
355
|
menu: [{
|
|
383
356
|
id: MenuId.ActivityBarPositionMenu,
|
|
384
357
|
order: 2
|
|
385
358
|
}, {
|
|
386
359
|
id: MenuId.CommandPalette,
|
|
387
|
-
when: ( ContextKeyExpr.notEquals(
|
|
360
|
+
when: ( (ContextKeyExpr.notEquals(
|
|
388
361
|
`config.${"workbench.activityBar.location" }`,
|
|
389
362
|
"top"
|
|
390
|
-
)),
|
|
363
|
+
))),
|
|
391
364
|
}]
|
|
392
365
|
});
|
|
393
366
|
}
|
|
@@ -401,36 +374,24 @@ registerAction2(class extends Action2 {
|
|
|
401
374
|
super({
|
|
402
375
|
id: 'workbench.action.activityBarLocation.bottom',
|
|
403
376
|
title: {
|
|
404
|
-
...( localize2WithPath(
|
|
405
|
-
|
|
406
|
-
'positionActivityBarBottom',
|
|
407
|
-
'Move Activity Bar to Bottom'
|
|
408
|
-
)),
|
|
409
|
-
mnemonicTitle: ( localizeWithPath(
|
|
410
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
411
|
-
{ key: 'miBottomActivityBar', comment: ['&& denotes a mnemonic'] },
|
|
412
|
-
"&&Bottom"
|
|
413
|
-
)),
|
|
377
|
+
...( localize2WithPath(_moduleId, 9, 'Move Activity Bar to Bottom')),
|
|
378
|
+
mnemonicTitle: ( localizeWithPath(_moduleId, 10, "&&Bottom")),
|
|
414
379
|
},
|
|
415
|
-
shortTitle: ( localizeWithPath(
|
|
416
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
417
|
-
'bottom',
|
|
418
|
-
"Bottom"
|
|
419
|
-
)),
|
|
380
|
+
shortTitle: ( localizeWithPath(_moduleId, 11, "Bottom")),
|
|
420
381
|
category: Categories.View,
|
|
421
|
-
toggled: ( ContextKeyExpr.equals(
|
|
382
|
+
toggled: ( (ContextKeyExpr.equals(
|
|
422
383
|
`config.${"workbench.activityBar.location" }`,
|
|
423
384
|
"bottom"
|
|
424
|
-
)),
|
|
385
|
+
))),
|
|
425
386
|
menu: [{
|
|
426
387
|
id: MenuId.ActivityBarPositionMenu,
|
|
427
388
|
order: 3
|
|
428
389
|
}, {
|
|
429
390
|
id: MenuId.CommandPalette,
|
|
430
|
-
when: ( ContextKeyExpr.notEquals(
|
|
391
|
+
when: ( (ContextKeyExpr.notEquals(
|
|
431
392
|
`config.${"workbench.activityBar.location" }`,
|
|
432
393
|
"bottom"
|
|
433
|
-
)),
|
|
394
|
+
))),
|
|
434
395
|
}]
|
|
435
396
|
});
|
|
436
397
|
}
|
|
@@ -444,32 +405,24 @@ registerAction2(class extends Action2 {
|
|
|
444
405
|
super({
|
|
445
406
|
id: 'workbench.action.activityBarLocation.hide',
|
|
446
407
|
title: {
|
|
447
|
-
...( localize2WithPath(
|
|
448
|
-
|
|
449
|
-
'hideActivityBar',
|
|
450
|
-
'Hide Activity Bar'
|
|
451
|
-
)),
|
|
452
|
-
mnemonicTitle: ( localizeWithPath(
|
|
453
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
454
|
-
{ key: 'miHideActivityBar', comment: ['&& denotes a mnemonic'] },
|
|
455
|
-
"&&Hidden"
|
|
456
|
-
)),
|
|
408
|
+
...( localize2WithPath(_moduleId, 12, 'Hide Activity Bar')),
|
|
409
|
+
mnemonicTitle: ( localizeWithPath(_moduleId, 13, "&&Hidden")),
|
|
457
410
|
},
|
|
458
|
-
shortTitle: ( localizeWithPath(
|
|
411
|
+
shortTitle: ( localizeWithPath(_moduleId, 14, "Hidden")),
|
|
459
412
|
category: Categories.View,
|
|
460
|
-
toggled: ( ContextKeyExpr.equals(
|
|
413
|
+
toggled: ( (ContextKeyExpr.equals(
|
|
461
414
|
`config.${"workbench.activityBar.location" }`,
|
|
462
415
|
"hidden"
|
|
463
|
-
)),
|
|
416
|
+
))),
|
|
464
417
|
menu: [{
|
|
465
418
|
id: MenuId.ActivityBarPositionMenu,
|
|
466
419
|
order: 4
|
|
467
420
|
}, {
|
|
468
421
|
id: MenuId.CommandPalette,
|
|
469
|
-
when: ( ContextKeyExpr.notEquals(
|
|
422
|
+
when: ( (ContextKeyExpr.notEquals(
|
|
470
423
|
`config.${"workbench.activityBar.location" }`,
|
|
471
424
|
"hidden"
|
|
472
|
-
)),
|
|
425
|
+
))),
|
|
473
426
|
}]
|
|
474
427
|
});
|
|
475
428
|
}
|
|
@@ -480,39 +433,27 @@ registerAction2(class extends Action2 {
|
|
|
480
433
|
});
|
|
481
434
|
MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
|
|
482
435
|
submenu: MenuId.ActivityBarPositionMenu,
|
|
483
|
-
title: ( localizeWithPath(
|
|
484
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
485
|
-
'positionActivituBar',
|
|
486
|
-
"Activity Bar Position"
|
|
487
|
-
)),
|
|
436
|
+
title: ( localizeWithPath(_moduleId, 15, "Activity Bar Position")),
|
|
488
437
|
group: '3_workbench_layout_move',
|
|
489
438
|
order: 2
|
|
490
439
|
});
|
|
491
440
|
MenuRegistry.appendMenuItem(MenuId.ViewContainerTitleContext, {
|
|
492
441
|
submenu: MenuId.ActivityBarPositionMenu,
|
|
493
|
-
title: ( localizeWithPath(
|
|
494
|
-
|
|
495
|
-
'positionActivituBar',
|
|
496
|
-
"Activity Bar Position"
|
|
497
|
-
)),
|
|
498
|
-
when: ( ContextKeyExpr.equals(
|
|
442
|
+
title: ( localizeWithPath(_moduleId, 15, "Activity Bar Position")),
|
|
443
|
+
when: ( (ContextKeyExpr.equals(
|
|
499
444
|
'viewContainerLocation',
|
|
500
445
|
ViewContainerLocationToString(0 )
|
|
501
|
-
)),
|
|
446
|
+
))),
|
|
502
447
|
group: '3_workbench_layout_move',
|
|
503
448
|
order: 1
|
|
504
449
|
});
|
|
505
450
|
MenuRegistry.appendMenuItem(MenuId.ViewTitleContext, {
|
|
506
451
|
submenu: MenuId.ActivityBarPositionMenu,
|
|
507
|
-
title: ( localizeWithPath(
|
|
508
|
-
|
|
509
|
-
'positionActivituBar',
|
|
510
|
-
"Activity Bar Position"
|
|
511
|
-
)),
|
|
512
|
-
when: ( ContextKeyExpr.equals(
|
|
452
|
+
title: ( localizeWithPath(_moduleId, 15, "Activity Bar Position")),
|
|
453
|
+
when: ( (ContextKeyExpr.equals(
|
|
513
454
|
'viewLocation',
|
|
514
455
|
ViewContainerLocationToString(0 )
|
|
515
|
-
)),
|
|
456
|
+
))),
|
|
516
457
|
group: '3_workbench_layout_move',
|
|
517
458
|
order: 1
|
|
518
459
|
});
|
|
@@ -542,11 +483,7 @@ registerAction2(class PreviousSideBarViewAction extends SwitchSideBarViewAction
|
|
|
542
483
|
constructor() {
|
|
543
484
|
super({
|
|
544
485
|
id: 'workbench.action.previousSideBarView',
|
|
545
|
-
title: ( localize2WithPath(
|
|
546
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
547
|
-
'previousSideBarView',
|
|
548
|
-
'Previous Primary Side Bar View'
|
|
549
|
-
)),
|
|
486
|
+
title: ( localize2WithPath(_moduleId, 16, 'Previous Primary Side Bar View')),
|
|
550
487
|
category: Categories.View,
|
|
551
488
|
f1: true
|
|
552
489
|
}, -1);
|
|
@@ -556,11 +493,7 @@ registerAction2(class NextSideBarViewAction extends SwitchSideBarViewAction {
|
|
|
556
493
|
constructor() {
|
|
557
494
|
super({
|
|
558
495
|
id: 'workbench.action.nextSideBarView',
|
|
559
|
-
title: ( localize2WithPath(
|
|
560
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
561
|
-
'nextSideBarView',
|
|
562
|
-
'Next Primary Side Bar View'
|
|
563
|
-
)),
|
|
496
|
+
title: ( localize2WithPath(_moduleId, 17, 'Next Primary Side Bar View')),
|
|
564
497
|
category: Categories.View,
|
|
565
498
|
f1: true
|
|
566
499
|
}, 1);
|
|
@@ -570,11 +503,7 @@ registerAction2(class FocusActivityBarAction extends Action2 {
|
|
|
570
503
|
constructor() {
|
|
571
504
|
super({
|
|
572
505
|
id: 'workbench.action.focusActivityBar',
|
|
573
|
-
title: ( localize2WithPath(
|
|
574
|
-
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
575
|
-
'focusActivityBar',
|
|
576
|
-
'Focus Activity Bar'
|
|
577
|
-
)),
|
|
506
|
+
title: ( localize2WithPath(_moduleId, 18, 'Focus Activity Bar')),
|
|
578
507
|
category: Categories.View,
|
|
579
508
|
f1: true
|
|
580
509
|
});
|
|
@@ -41,6 +41,7 @@ import { ActionViewItem } from 'vscode/vscode/vs/base/browser/ui/actionbar/actio
|
|
|
41
41
|
import { CompositeMenuActions } from 'vscode/vscode/vs/workbench/browser/actions';
|
|
42
42
|
|
|
43
43
|
var AuxiliaryBarPart_1;
|
|
44
|
+
const _moduleId = "vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart";
|
|
44
45
|
let AuxiliaryBarPart = class AuxiliaryBarPart extends AbstractPaneCompositePart {
|
|
45
46
|
static { AuxiliaryBarPart_1 = this; }
|
|
46
47
|
static { this.activePanelSettingsKey = 'workbench.auxiliarybar.activepanelid'; }
|
|
@@ -134,7 +135,7 @@ let AuxiliaryBarPart = class AuxiliaryBarPart extends AbstractPaneCompositePart
|
|
|
134
135
|
const currentPositionRight = this.layoutService.getSideBarPosition() === 0 ;
|
|
135
136
|
const viewsSubmenuAction = this.getViewsSubmenuAction();
|
|
136
137
|
if (viewsSubmenuAction) {
|
|
137
|
-
actions.push(( new Separator()));
|
|
138
|
+
actions.push(( (new Separator())));
|
|
138
139
|
actions.push(viewsSubmenuAction);
|
|
139
140
|
}
|
|
140
141
|
const activityBarPositionMenu = this.menuService.createMenu(MenuId.ActivityBarPositionMenu, this.contextKeyService);
|
|
@@ -142,26 +143,10 @@ let AuxiliaryBarPart = class AuxiliaryBarPart extends AbstractPaneCompositePart
|
|
|
142
143
|
createAndFillInContextMenuActions(activityBarPositionMenu, { shouldForwardArgs: true, renderShortTitle: true }, { primary: [], secondary: positionActions });
|
|
143
144
|
activityBarPositionMenu.dispose();
|
|
144
145
|
actions.push(...[
|
|
145
|
-
( new Separator()),
|
|
146
|
-
( new SubmenuAction('workbench.action.panel.position', ( localizeWithPath(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"Activity Bar Position"
|
|
150
|
-
)), positionActions)),
|
|
151
|
-
toAction({ id: ToggleSidebarPositionAction.ID, label: currentPositionRight ? ( localizeWithPath(
|
|
152
|
-
'vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart',
|
|
153
|
-
'move second side bar left',
|
|
154
|
-
"Move Secondary Side Bar Left"
|
|
155
|
-
)) : ( localizeWithPath(
|
|
156
|
-
'vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart',
|
|
157
|
-
'move second side bar right',
|
|
158
|
-
"Move Secondary Side Bar Right"
|
|
159
|
-
)), run: () => this.commandService.executeCommand(ToggleSidebarPositionAction.ID) }),
|
|
160
|
-
toAction({ id: ToggleAuxiliaryBarAction.ID, label: ( localizeWithPath(
|
|
161
|
-
'vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart',
|
|
162
|
-
'hide second side bar',
|
|
163
|
-
"Hide Secondary Side Bar"
|
|
164
|
-
)), run: () => this.commandService.executeCommand(ToggleAuxiliaryBarAction.ID) })
|
|
146
|
+
( (new Separator())),
|
|
147
|
+
( (new SubmenuAction('workbench.action.panel.position', ( localizeWithPath(_moduleId, 0, "Activity Bar Position")), positionActions))),
|
|
148
|
+
toAction({ id: ToggleSidebarPositionAction.ID, label: currentPositionRight ? ( localizeWithPath(_moduleId, 1, "Move Secondary Side Bar Left")) : ( localizeWithPath(_moduleId, 2, "Move Secondary Side Bar Right")), run: () => this.commandService.executeCommand(ToggleSidebarPositionAction.ID) }),
|
|
149
|
+
toAction({ id: ToggleAuxiliaryBarAction.ID, label: ( localizeWithPath(_moduleId, 3, "Hide Secondary Side Bar")), run: () => this.commandService.executeCommand(ToggleAuxiliaryBarAction.ID) })
|
|
165
150
|
]);
|
|
166
151
|
}
|
|
167
152
|
shouldShowCompositeBar() {
|
|
@@ -210,20 +195,20 @@ let AuxiliaryBarPart = class AuxiliaryBarPart extends AbstractPaneCompositePart
|
|
|
210
195
|
};
|
|
211
196
|
}
|
|
212
197
|
};
|
|
213
|
-
AuxiliaryBarPart = AuxiliaryBarPart_1 = ( __decorate([
|
|
214
|
-
( __param(0, INotificationService)),
|
|
215
|
-
( __param(1, IStorageService)),
|
|
216
|
-
( __param(2, IContextMenuService)),
|
|
217
|
-
( __param(3, IWorkbenchLayoutService)),
|
|
218
|
-
( __param(4, IKeybindingService)),
|
|
219
|
-
( __param(5, IInstantiationService)),
|
|
220
|
-
( __param(6, IThemeService)),
|
|
221
|
-
( __param(7, IViewDescriptorService)),
|
|
222
|
-
( __param(8, IContextKeyService)),
|
|
223
|
-
( __param(9, IExtensionService)),
|
|
224
|
-
( __param(10, ICommandService)),
|
|
225
|
-
( __param(11, IMenuService)),
|
|
226
|
-
( __param(12, IConfigurationService))
|
|
227
|
-
], AuxiliaryBarPart));
|
|
198
|
+
AuxiliaryBarPart = AuxiliaryBarPart_1 = ( (__decorate([
|
|
199
|
+
( (__param(0, INotificationService))),
|
|
200
|
+
( (__param(1, IStorageService))),
|
|
201
|
+
( (__param(2, IContextMenuService))),
|
|
202
|
+
( (__param(3, IWorkbenchLayoutService))),
|
|
203
|
+
( (__param(4, IKeybindingService))),
|
|
204
|
+
( (__param(5, IInstantiationService))),
|
|
205
|
+
( (__param(6, IThemeService))),
|
|
206
|
+
( (__param(7, IViewDescriptorService))),
|
|
207
|
+
( (__param(8, IContextKeyService))),
|
|
208
|
+
( (__param(9, IExtensionService))),
|
|
209
|
+
( (__param(10, ICommandService))),
|
|
210
|
+
( (__param(11, IMenuService))),
|
|
211
|
+
( (__param(12, IConfigurationService)))
|
|
212
|
+
], AuxiliaryBarPart)));
|
|
228
213
|
|
|
229
214
|
export { AuxiliaryBarPart };
|
|
@@ -14,6 +14,7 @@ import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.
|
|
|
14
14
|
import { CompositeDragAndDropObserver, toggleDropEffect } from 'vscode/vscode/vs/workbench/browser/dnd';
|
|
15
15
|
import { Gesture, EventType as EventType$1 } from 'vscode/vscode/vs/base/browser/touch';
|
|
16
16
|
|
|
17
|
+
const _moduleId = "vs/workbench/browser/parts/compositeBar";
|
|
17
18
|
class CompositeDragAndDrop {
|
|
18
19
|
constructor(viewDescriptorService, targetContainerLocation, orientation, openComposite, moveComposite, getItems) {
|
|
19
20
|
this.viewDescriptorService = viewDescriptorService;
|
|
@@ -91,11 +92,11 @@ let CompositeBar = class CompositeBar extends Widget {
|
|
|
91
92
|
this.instantiationService = instantiationService;
|
|
92
93
|
this.contextMenuService = contextMenuService;
|
|
93
94
|
this.viewDescriptorService = viewDescriptorService;
|
|
94
|
-
this._onDidChange = this._register(( new Emitter()));
|
|
95
|
+
this._onDidChange = this._register(( (new Emitter())));
|
|
95
96
|
this.onDidChange = this._onDidChange.event;
|
|
96
|
-
this.model = ( new CompositeBarModel(items, options));
|
|
97
|
+
this.model = ( (new CompositeBarModel(items, options)));
|
|
97
98
|
this.visibleComposites = [];
|
|
98
|
-
this.compositeSizeInBar = ( new Map());
|
|
99
|
+
this.compositeSizeInBar = ( (new Map()));
|
|
99
100
|
this.computeSizes(this.model.visibleItems);
|
|
100
101
|
}
|
|
101
102
|
getCompositeBarItems() {
|
|
@@ -113,7 +114,7 @@ let CompositeBar = class CompositeBar extends Widget {
|
|
|
113
114
|
}
|
|
114
115
|
create(parent) {
|
|
115
116
|
const actionBarDiv = parent.appendChild($('.composite-bar'));
|
|
116
|
-
this.compositeSwitcherBar = this._register(( new ActionBar(actionBarDiv, {
|
|
117
|
+
this.compositeSwitcherBar = this._register(( (new ActionBar(actionBarDiv, {
|
|
117
118
|
actionViewItemProvider: (action, options) => {
|
|
118
119
|
if (action instanceof CompositeOverflowActivityAction) {
|
|
119
120
|
return this.compositeOverflowActionViewItem;
|
|
@@ -122,15 +123,11 @@ let CompositeBar = class CompositeBar extends Widget {
|
|
|
122
123
|
return item && this.instantiationService.createInstance(CompositeActionViewItem, { ...options, draggable: true, colors: this.options.colors, icon: this.options.icon, hoverOptions: this.options.activityHoverOptions, compact: this.options.compact }, action, item.pinnedAction, item.toggleBadgeAction, compositeId => this.options.getContextMenuActionsForComposite(compositeId), () => this.getContextMenuActions(), this.options.dndHandler, this);
|
|
123
124
|
},
|
|
124
125
|
orientation: this.options.orientation,
|
|
125
|
-
ariaLabel: ( localizeWithPath(
|
|
126
|
-
'vs/workbench/browser/parts/compositeBar',
|
|
127
|
-
'activityBarAriaLabel',
|
|
128
|
-
"Active View Switcher"
|
|
129
|
-
)),
|
|
126
|
+
ariaLabel: ( localizeWithPath(_moduleId, 0, "Active View Switcher")),
|
|
130
127
|
ariaRole: 'tablist',
|
|
131
128
|
preventLoopNavigation: this.options.preventLoopNavigation,
|
|
132
129
|
triggerKeys: { keyDown: true }
|
|
133
|
-
})));
|
|
130
|
+
}))));
|
|
134
131
|
this._register(addDisposableListener(parent, EventType.CONTEXT_MENU, e => this.showContextMenu(getWindow(parent), e)));
|
|
135
132
|
this._register(Gesture.addTarget(parent));
|
|
136
133
|
this._register(addDisposableListener(parent, EventType$1.Contextmenu, e => this.showContextMenu(getWindow(parent), e)));
|
|
@@ -318,7 +315,7 @@ let CompositeBar = class CompositeBar extends Widget {
|
|
|
318
315
|
const compositeSwitcherBar = this.compositeSwitcherBar;
|
|
319
316
|
if (compositeSwitcherBar && this.dimension && this.dimension.height !== 0 && this.dimension.width !== 0) {
|
|
320
317
|
const currentItemsLength = compositeSwitcherBar.viewItems.length;
|
|
321
|
-
compositeSwitcherBar.push(( items.map(composite => composite.activityAction)));
|
|
318
|
+
compositeSwitcherBar.push(( (items.map(composite => composite.activityAction))));
|
|
322
319
|
items.forEach((composite, index) => this.compositeSizeInBar.set(composite.id, this.options.orientation === 1
|
|
323
320
|
? compositeSwitcherBar.getHeight(currentItemsLength + index)
|
|
324
321
|
: compositeSwitcherBar.getWidth(currentItemsLength + index)));
|
|
@@ -331,8 +328,8 @@ let CompositeBar = class CompositeBar extends Widget {
|
|
|
331
328
|
if (!compositeSwitcherBar || !this.dimension) {
|
|
332
329
|
return;
|
|
333
330
|
}
|
|
334
|
-
let compositesToShow = ( this.model.visibleItems.filter(item => item.pinned
|
|
335
|
-
|| (this.model.activeItem && this.model.activeItem.id === item.id) ).map(item => item.id));
|
|
331
|
+
let compositesToShow = ( (this.model.visibleItems.filter(item => item.pinned
|
|
332
|
+
|| (this.model.activeItem && this.model.activeItem.id === item.id) ).map(item => item.id)));
|
|
336
333
|
let maxVisible = compositesToShow.length;
|
|
337
334
|
const totalComposites = compositesToShow.length;
|
|
338
335
|
let size = 0;
|
|
@@ -405,25 +402,27 @@ let CompositeBar = class CompositeBar extends Widget {
|
|
|
405
402
|
this._onDidChange.fire();
|
|
406
403
|
}
|
|
407
404
|
getOverflowingComposites() {
|
|
408
|
-
let overflowingIds = ( this.model.visibleItems.filter(item => item.pinned).map(item => item.id));
|
|
405
|
+
let overflowingIds = ( (this.model.visibleItems.filter(item => item.pinned).map(item => item.id)));
|
|
409
406
|
if (this.model.activeItem && !this.model.activeItem.pinned) {
|
|
410
407
|
overflowingIds.push(this.model.activeItem.id);
|
|
411
408
|
}
|
|
412
409
|
overflowingIds = overflowingIds.filter(compositeId => !this.visibleComposites.includes(compositeId));
|
|
413
|
-
return (
|
|
414
|
-
|
|
415
|
-
|
|
410
|
+
return (
|
|
411
|
+
(this.model.visibleItems.filter(c => overflowingIds.includes(c.id)).map(
|
|
412
|
+
item => { return { id: item.id, name: this.getAction(item.id)?.label || item.name }; }
|
|
413
|
+
))
|
|
414
|
+
);
|
|
416
415
|
}
|
|
417
416
|
showContextMenu(targetWindow, e) {
|
|
418
417
|
EventHelper.stop(e, true);
|
|
419
|
-
const event = ( new StandardMouseEvent(targetWindow, e));
|
|
418
|
+
const event = ( (new StandardMouseEvent(targetWindow, e)));
|
|
420
419
|
this.contextMenuService.showContextMenu({
|
|
421
420
|
getAnchor: () => event,
|
|
422
421
|
getActions: () => this.getContextMenuActions(e)
|
|
423
422
|
});
|
|
424
423
|
}
|
|
425
424
|
getContextMenuActions(e) {
|
|
426
|
-
const actions = ( this.model.visibleItems
|
|
425
|
+
const actions = ( (this.model.visibleItems
|
|
427
426
|
.map(({ id, name, activityAction }) => (toAction({
|
|
428
427
|
id,
|
|
429
428
|
label: this.getAction(id).label || name || id,
|
|
@@ -437,16 +436,16 @@ let CompositeBar = class CompositeBar extends Widget {
|
|
|
437
436
|
this.pin(id, true);
|
|
438
437
|
}
|
|
439
438
|
}
|
|
440
|
-
}))));
|
|
439
|
+
})))));
|
|
441
440
|
this.options.fillExtraContextMenuActions(actions, e);
|
|
442
441
|
return actions;
|
|
443
442
|
}
|
|
444
443
|
};
|
|
445
|
-
CompositeBar = ( __decorate([
|
|
446
|
-
( __param(2, IInstantiationService)),
|
|
447
|
-
( __param(3, IContextMenuService)),
|
|
448
|
-
( __param(4, IViewDescriptorService))
|
|
449
|
-
], CompositeBar));
|
|
444
|
+
CompositeBar = ( (__decorate([
|
|
445
|
+
( (__param(2, IInstantiationService))),
|
|
446
|
+
( (__param(3, IContextMenuService))),
|
|
447
|
+
( (__param(4, IViewDescriptorService)))
|
|
448
|
+
], CompositeBar)));
|
|
450
449
|
class CompositeBarModel {
|
|
451
450
|
get items() { return this._items; }
|
|
452
451
|
constructor(items, options) {
|
|
@@ -456,10 +455,10 @@ class CompositeBarModel {
|
|
|
456
455
|
}
|
|
457
456
|
setItems(items) {
|
|
458
457
|
this._items = [];
|
|
459
|
-
this._items = ( items
|
|
458
|
+
this._items = ( (items
|
|
460
459
|
.map(
|
|
461
460
|
i => this.createCompositeBarItem(i.id, i.name, i.order, i.pinned, i.visible)
|
|
462
|
-
));
|
|
461
|
+
)));
|
|
463
462
|
}
|
|
464
463
|
get visibleItems() {
|
|
465
464
|
return this.items.filter(item => item.visible);
|