@codingame/monaco-vscode-view-status-bar-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 +2 -2
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +28 -43
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarActions.js +3 -11
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarItem.js +8 -6
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarModel.js +1 -2
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.js +58 -61
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-view-status-bar-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@5.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -11,6 +11,7 @@ import { isProposedApiEnabled } from 'vscode/vscode/vs/workbench/services/extens
|
|
|
11
11
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
12
12
|
import { IExtensionStatusBarItemService } from 'vscode/vscode/vs/workbench/api/browser/statusBarService';
|
|
13
13
|
|
|
14
|
+
const _moduleId = "vs/workbench/api/browser/statusBarExtensionPoint";
|
|
14
15
|
function isUserFriendlyStatusItemEntry(candidate) {
|
|
15
16
|
const obj = candidate;
|
|
16
17
|
return (typeof obj.id === 'string' && obj.id.length > 0)
|
|
@@ -29,81 +30,73 @@ const statusBarItemSchema = {
|
|
|
29
30
|
id: {
|
|
30
31
|
type: 'string',
|
|
31
32
|
markdownDescription: ( localizeWithPath(
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
_moduleId,
|
|
34
|
+
0,
|
|
34
35
|
'The identifier of the status bar entry. Must be unique within the extension. The same value must be used when calling the `vscode.window.createStatusBarItem(id, ...)`-API'
|
|
35
36
|
))
|
|
36
37
|
},
|
|
37
38
|
name: {
|
|
38
39
|
type: 'string',
|
|
39
40
|
description: ( localizeWithPath(
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
_moduleId,
|
|
42
|
+
1,
|
|
42
43
|
'The name of the entry, like \'Python Language Indicator\', \'Git Status\' etc. Try to keep the length of the name short, yet descriptive enough that users can understand what the status bar item is about.'
|
|
43
44
|
))
|
|
44
45
|
},
|
|
45
46
|
text: {
|
|
46
47
|
type: 'string',
|
|
47
48
|
description: ( localizeWithPath(
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
_moduleId,
|
|
50
|
+
2,
|
|
50
51
|
'The text to show for the entry. You can embed icons in the text by leveraging the `$(<name>)`-syntax, like \'Hello $(globe)!\''
|
|
51
52
|
))
|
|
52
53
|
},
|
|
53
54
|
tooltip: {
|
|
54
55
|
type: 'string',
|
|
55
|
-
description: ( localizeWithPath(
|
|
56
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
57
|
-
'tooltip',
|
|
58
|
-
'The tooltip text for the entry.'
|
|
59
|
-
))
|
|
56
|
+
description: ( localizeWithPath(_moduleId, 3, 'The tooltip text for the entry.'))
|
|
60
57
|
},
|
|
61
58
|
command: {
|
|
62
59
|
type: 'string',
|
|
63
60
|
description: ( localizeWithPath(
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
_moduleId,
|
|
62
|
+
4,
|
|
66
63
|
'The command to execute when the status bar entry is clicked.'
|
|
67
64
|
))
|
|
68
65
|
},
|
|
69
66
|
alignment: {
|
|
70
67
|
type: 'string',
|
|
71
68
|
enum: ['left', 'right'],
|
|
72
|
-
description: ( localizeWithPath(
|
|
73
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
74
|
-
'alignment',
|
|
75
|
-
'The alignment of the status bar entry.'
|
|
76
|
-
))
|
|
69
|
+
description: ( localizeWithPath(_moduleId, 5, 'The alignment of the status bar entry.'))
|
|
77
70
|
},
|
|
78
71
|
priority: {
|
|
79
72
|
type: 'number',
|
|
80
73
|
description: ( localizeWithPath(
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
_moduleId,
|
|
75
|
+
6,
|
|
83
76
|
'The priority of the status bar entry. Higher value means the item should be shown more to the left.'
|
|
84
77
|
))
|
|
85
78
|
},
|
|
86
79
|
accessibilityInformation: {
|
|
87
80
|
type: 'object',
|
|
88
81
|
description: ( localizeWithPath(
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
_moduleId,
|
|
83
|
+
7,
|
|
91
84
|
'Defines the role and aria label to be used when the status bar entry is focused.'
|
|
92
85
|
)),
|
|
93
86
|
properties: {
|
|
94
87
|
role: {
|
|
95
88
|
type: 'string',
|
|
96
89
|
description: ( localizeWithPath(
|
|
97
|
-
|
|
98
|
-
|
|
90
|
+
_moduleId,
|
|
91
|
+
8,
|
|
99
92
|
'The role of the status bar entry which defines how a screen reader interacts with it. More about aria roles can be found here https://w3c.github.io/aria/#widget_roles'
|
|
100
93
|
))
|
|
101
94
|
},
|
|
102
95
|
label: {
|
|
103
96
|
type: 'string',
|
|
104
97
|
description: ( localizeWithPath(
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
_moduleId,
|
|
99
|
+
9,
|
|
107
100
|
'The aria label of the status bar entry. Defaults to the entry\'s text.'
|
|
108
101
|
))
|
|
109
102
|
}
|
|
@@ -112,11 +105,7 @@ const statusBarItemSchema = {
|
|
|
112
105
|
}
|
|
113
106
|
};
|
|
114
107
|
const statusBarItemsSchema = {
|
|
115
|
-
description: ( localizeWithPath(
|
|
116
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
117
|
-
'vscode.extension.contributes.statusBarItems',
|
|
118
|
-
"Contributes items to the status bar."
|
|
119
|
-
)),
|
|
108
|
+
description: ( localizeWithPath(_moduleId, 10, "Contributes items to the status bar.")),
|
|
120
109
|
oneOf: [
|
|
121
110
|
statusBarItemSchema,
|
|
122
111
|
{
|
|
@@ -131,7 +120,7 @@ const statusBarItemsExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
131
120
|
});
|
|
132
121
|
let StatusBarItemsExtensionPoint = class StatusBarItemsExtensionPoint {
|
|
133
122
|
constructor(statusBarItemsService) {
|
|
134
|
-
const contributions = ( new DisposableStore());
|
|
123
|
+
const contributions = ( (new DisposableStore()));
|
|
135
124
|
statusBarItemsExtensionPoint.setHandler((extensions) => {
|
|
136
125
|
contributions.clear();
|
|
137
126
|
for (const entry of extensions) {
|
|
@@ -142,11 +131,7 @@ let StatusBarItemsExtensionPoint = class StatusBarItemsExtensionPoint {
|
|
|
142
131
|
const { value, collector } = entry;
|
|
143
132
|
for (const candidate of Iterable.wrap(value)) {
|
|
144
133
|
if (!isUserFriendlyStatusItemEntry(candidate)) {
|
|
145
|
-
collector.error(( localizeWithPath(
|
|
146
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
147
|
-
'invalid',
|
|
148
|
-
"Invalid status bar item contribution."
|
|
149
|
-
)));
|
|
134
|
+
collector.error(( localizeWithPath(_moduleId, 11, "Invalid status bar item contribution.")));
|
|
150
135
|
continue;
|
|
151
136
|
}
|
|
152
137
|
const fullItemId = asStatusBarItemIdentifier(entry.description.identifier, candidate.id);
|
|
@@ -159,9 +144,9 @@ let StatusBarItemsExtensionPoint = class StatusBarItemsExtensionPoint {
|
|
|
159
144
|
});
|
|
160
145
|
}
|
|
161
146
|
};
|
|
162
|
-
StatusBarItemsExtensionPoint = ( __decorate([
|
|
163
|
-
( __param(0, IExtensionStatusBarItemService))
|
|
164
|
-
], StatusBarItemsExtensionPoint));
|
|
147
|
+
StatusBarItemsExtensionPoint = ( (__decorate([
|
|
148
|
+
( (__param(0, IExtensionStatusBarItemService)))
|
|
149
|
+
], StatusBarItemsExtensionPoint)));
|
|
165
150
|
let StatusBarItemsExtensionPointWorkbenchContribution = class StatusBarItemsExtensionPointWorkbenchContribution {
|
|
166
151
|
static { this.ID = 'workbench.contrib.statusBarItemsExtensionPoint'; }
|
|
167
152
|
constructor(instantiationService) {
|
|
@@ -169,9 +154,9 @@ let StatusBarItemsExtensionPointWorkbenchContribution = class StatusBarItemsExte
|
|
|
169
154
|
this.instantiationService.createInstance(StatusBarItemsExtensionPoint);
|
|
170
155
|
}
|
|
171
156
|
};
|
|
172
|
-
StatusBarItemsExtensionPointWorkbenchContribution = ( __decorate([
|
|
173
|
-
( __param(0, IInstantiationService))
|
|
174
|
-
], StatusBarItemsExtensionPointWorkbenchContribution));
|
|
157
|
+
StatusBarItemsExtensionPointWorkbenchContribution = ( (__decorate([
|
|
158
|
+
( (__param(0, IInstantiationService)))
|
|
159
|
+
], StatusBarItemsExtensionPointWorkbenchContribution)));
|
|
175
160
|
registerWorkbenchContribution2(StatusBarItemsExtensionPointWorkbenchContribution.ID, StatusBarItemsExtensionPointWorkbenchContribution, 1 );
|
|
176
161
|
|
|
177
162
|
export { StatusBarItemsExtensionPoint };
|
|
@@ -9,6 +9,7 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
9
9
|
import { StatusBarFocused } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
10
10
|
import { getActiveWindow } from 'vscode/vscode/vs/base/browser/dom';
|
|
11
11
|
|
|
12
|
+
const _moduleId = "vs/workbench/browser/parts/statusbar/statusbarActions";
|
|
12
13
|
class ToggleStatusbarEntryVisibilityAction extends Action {
|
|
13
14
|
constructor(id, label, model) {
|
|
14
15
|
super(id, label, undefined, true);
|
|
@@ -26,12 +27,7 @@ class ToggleStatusbarEntryVisibilityAction extends Action {
|
|
|
26
27
|
}
|
|
27
28
|
class HideStatusbarEntryAction extends Action {
|
|
28
29
|
constructor(id, name, model) {
|
|
29
|
-
super(id, ( localizeWithPath(
|
|
30
|
-
'vs/workbench/browser/parts/statusbar/statusbarActions',
|
|
31
|
-
'hide',
|
|
32
|
-
"Hide '{0}'",
|
|
33
|
-
name
|
|
34
|
-
)), undefined, true);
|
|
30
|
+
super(id, ( localizeWithPath(_moduleId, 0, "Hide '{0}'", name)), undefined, true);
|
|
35
31
|
this.model = model;
|
|
36
32
|
}
|
|
37
33
|
async run() {
|
|
@@ -102,11 +98,7 @@ class FocusStatusBarAction extends Action2 {
|
|
|
102
98
|
constructor() {
|
|
103
99
|
super({
|
|
104
100
|
id: 'workbench.action.focusStatusBar',
|
|
105
|
-
title: ( localize2WithPath(
|
|
106
|
-
'vs/workbench/browser/parts/statusbar/statusbarActions',
|
|
107
|
-
'focusStatusBar',
|
|
108
|
-
'Focus Status Bar'
|
|
109
|
-
)),
|
|
101
|
+
title: ( localize2WithPath(_moduleId, 1, 'Focus Status Bar')),
|
|
110
102
|
category: Categories.View,
|
|
111
103
|
f1: true
|
|
112
104
|
});
|
|
@@ -13,9 +13,9 @@ import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
|
13
13
|
import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
14
14
|
import { renderIcon, renderLabelWithIcons } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
15
15
|
import { syncing, spinningLoading } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
16
|
-
import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatableHoverWidget';
|
|
17
16
|
import { isMarkdownString, markdownStringEqual } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
18
17
|
import { Gesture, EventType as EventType$1 } from 'vscode/vscode/vs/base/browser/touch';
|
|
18
|
+
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
19
19
|
|
|
20
20
|
let StatusbarEntryItem = class StatusbarEntryItem extends Disposable {
|
|
21
21
|
get name() {
|
|
@@ -24,11 +24,12 @@ let StatusbarEntryItem = class StatusbarEntryItem extends Disposable {
|
|
|
24
24
|
get hasCommand() {
|
|
25
25
|
return typeof this.entry?.command !== 'undefined';
|
|
26
26
|
}
|
|
27
|
-
constructor(container, entry, hoverDelegate, commandService, notificationService, telemetryService, themeService) {
|
|
27
|
+
constructor(container, entry, hoverDelegate, commandService, hoverService, notificationService, telemetryService, themeService) {
|
|
28
28
|
super();
|
|
29
29
|
this.container = container;
|
|
30
30
|
this.hoverDelegate = hoverDelegate;
|
|
31
31
|
this.commandService = commandService;
|
|
32
|
+
this.hoverService = hoverService;
|
|
32
33
|
this.notificationService = notificationService;
|
|
33
34
|
this.telemetryService = telemetryService;
|
|
34
35
|
this.themeService = themeService;
|
|
@@ -77,7 +78,7 @@ let StatusbarEntryItem = class StatusbarEntryItem extends Disposable {
|
|
|
77
78
|
this.hover.update(hoverContents);
|
|
78
79
|
}
|
|
79
80
|
else {
|
|
80
|
-
this.hover = this._register(
|
|
81
|
+
this.hover = this._register(this.hoverService.setupUpdatableHover(this.hoverDelegate, this.container, hoverContents));
|
|
81
82
|
}
|
|
82
83
|
if (entry.command !== ShowTooltipCommand ) {
|
|
83
84
|
this.focusListener.value = addDisposableListener(this.labelContainer, EventType.FOCUS, e => {
|
|
@@ -208,9 +209,10 @@ let StatusbarEntryItem = class StatusbarEntryItem extends Disposable {
|
|
|
208
209
|
};
|
|
209
210
|
StatusbarEntryItem = ( __decorate([
|
|
210
211
|
( __param(3, ICommandService)),
|
|
211
|
-
( __param(4,
|
|
212
|
-
( __param(5,
|
|
213
|
-
( __param(6,
|
|
212
|
+
( __param(4, IHoverService)),
|
|
213
|
+
( __param(5, INotificationService)),
|
|
214
|
+
( __param(6, ITelemetryService)),
|
|
215
|
+
( __param(7, IThemeService))
|
|
214
216
|
], StatusbarEntryItem));
|
|
215
217
|
class StatusBarCodiconLabel extends SimpleIconLabel {
|
|
216
218
|
constructor(container) {
|
|
@@ -23,8 +23,7 @@ class StatusbarViewModel extends Disposable {
|
|
|
23
23
|
const hiddenRaw = this.storageService.get(StatusbarViewModel.HIDDEN_ENTRIES_KEY, 0 );
|
|
24
24
|
if (hiddenRaw) {
|
|
25
25
|
try {
|
|
26
|
-
|
|
27
|
-
this.hidden = ( new Set(hiddenArray.filter(entry => !entry.startsWith('status.workspaceTrust.'))));
|
|
26
|
+
this.hidden = ( new Set(JSON.parse(hiddenRaw)));
|
|
28
27
|
}
|
|
29
28
|
catch (error) {
|
|
30
29
|
}
|
|
@@ -41,6 +41,7 @@ import { StatusBarFocused } from 'vscode/vscode/vs/workbench/common/contextkeys'
|
|
|
41
41
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
42
42
|
|
|
43
43
|
var StatusbarPart_1, AuxiliaryStatusbarPart_1;
|
|
44
|
+
const _moduleId = "vs/workbench/browser/parts/statusbar/statusbarPart";
|
|
44
45
|
let StatusbarPart = class StatusbarPart extends Part {
|
|
45
46
|
static { StatusbarPart_1 = this; }
|
|
46
47
|
static { this.HEIGHT = 22; }
|
|
@@ -56,9 +57,9 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
56
57
|
this.minimumHeight = StatusbarPart_1.HEIGHT;
|
|
57
58
|
this.maximumHeight = StatusbarPart_1.HEIGHT;
|
|
58
59
|
this.pendingEntries = [];
|
|
59
|
-
this.viewModel = this._register(( new StatusbarViewModel(this.storageService)));
|
|
60
|
+
this.viewModel = this._register(( (new StatusbarViewModel(this.storageService))));
|
|
60
61
|
this.onDidChangeEntryVisibility = this.viewModel.onDidChangeEntryVisibility;
|
|
61
|
-
this._onWillDispose = this._register(( new Emitter()));
|
|
62
|
+
this._onWillDispose = this._register(( (new Emitter())));
|
|
62
63
|
this.onWillDispose = this._onWillDispose.event;
|
|
63
64
|
this.hoverDelegate = this._register(this.instantiationService.createInstance(WorkbenchHoverDelegate, 'element', true, (_, focus) => ({
|
|
64
65
|
persistence: {
|
|
@@ -66,8 +67,8 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
66
67
|
sticky: focus
|
|
67
68
|
}
|
|
68
69
|
})));
|
|
69
|
-
this.compactEntriesDisposable = this._register(( new MutableDisposable()));
|
|
70
|
-
this.styleOverrides = ( new Set());
|
|
70
|
+
this.compactEntriesDisposable = this._register(( (new MutableDisposable())));
|
|
71
|
+
this.styleOverrides = ( (new Set()));
|
|
71
72
|
this.registerListeners();
|
|
72
73
|
}
|
|
73
74
|
registerListeners() {
|
|
@@ -267,15 +268,15 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
267
268
|
}
|
|
268
269
|
updateCompactEntries() {
|
|
269
270
|
const entries = this.viewModel.entries;
|
|
270
|
-
const mapIdToVisibleEntry = ( new Map());
|
|
271
|
+
const mapIdToVisibleEntry = ( (new Map()));
|
|
271
272
|
for (const entry of entries) {
|
|
272
273
|
if (!this.viewModel.isHidden(entry.id)) {
|
|
273
274
|
mapIdToVisibleEntry.set(entry.id, entry);
|
|
274
275
|
}
|
|
275
276
|
entry.container.classList.remove('compact-left', 'compact-right');
|
|
276
277
|
}
|
|
277
|
-
const compactEntryGroups = ( new Map());
|
|
278
|
-
for (const entry of ( mapIdToVisibleEntry.values())) {
|
|
278
|
+
const compactEntryGroups = ( (new Map()));
|
|
279
|
+
for (const entry of ( (mapIdToVisibleEntry.values()))) {
|
|
279
280
|
if (isStatusbarEntryLocation(entry.priority.primary) &&
|
|
280
281
|
entry.priority.primary.compact
|
|
281
282
|
) {
|
|
@@ -286,7 +287,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
286
287
|
}
|
|
287
288
|
let compactEntryGroup = compactEntryGroups.get(locationId);
|
|
288
289
|
if (!compactEntryGroup) {
|
|
289
|
-
compactEntryGroup = ( new Set([entry, location]));
|
|
290
|
+
compactEntryGroup = ( (new Set([entry, location])));
|
|
290
291
|
compactEntryGroups.set(locationId, compactEntryGroup);
|
|
291
292
|
}
|
|
292
293
|
else {
|
|
@@ -304,7 +305,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
304
305
|
}
|
|
305
306
|
const statusBarItemHoverBackground = this.getColor(STATUS_BAR_ITEM_HOVER_BACKGROUND);
|
|
306
307
|
const statusBarItemCompactHoverBackground = this.getColor(STATUS_BAR_ITEM_COMPACT_HOVER_BACKGROUND);
|
|
307
|
-
this.compactEntriesDisposable.value = ( new DisposableStore());
|
|
308
|
+
this.compactEntriesDisposable.value = ( (new DisposableStore()));
|
|
308
309
|
if (statusBarItemHoverBackground && statusBarItemCompactHoverBackground && !isHighContrast(this.theme.type)) {
|
|
309
310
|
for (const [, compactEntryGroup] of compactEntryGroups) {
|
|
310
311
|
for (const compactEntry of compactEntryGroup) {
|
|
@@ -324,7 +325,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
324
325
|
}
|
|
325
326
|
showContextMenu(e) {
|
|
326
327
|
EventHelper.stop(e, true);
|
|
327
|
-
const event = ( new StandardMouseEvent(getWindow(this.element), e));
|
|
328
|
+
const event = ( (new StandardMouseEvent(getWindow(this.element), e)));
|
|
328
329
|
let actions = undefined;
|
|
329
330
|
this.contextMenuService.showContextMenu({
|
|
330
331
|
getAnchor: () => event,
|
|
@@ -341,16 +342,12 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
341
342
|
}
|
|
342
343
|
getContextMenuActions(event) {
|
|
343
344
|
const actions = [];
|
|
344
|
-
actions.push(toAction({ id: ToggleStatusbarVisibilityAction.ID, label: ( localizeWithPath(
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
"Hide Status Bar"
|
|
348
|
-
)), run: () => this.instantiationService.invokeFunction(accessor => ( new ToggleStatusbarVisibilityAction()).run(accessor)) }));
|
|
349
|
-
actions.push(( new Separator()));
|
|
350
|
-
const handledEntries = ( new Set());
|
|
345
|
+
actions.push(toAction({ id: ToggleStatusbarVisibilityAction.ID, label: ( localizeWithPath(_moduleId, 0, "Hide Status Bar")), run: () => this.instantiationService.invokeFunction(accessor => ( (new ToggleStatusbarVisibilityAction())).run(accessor)) }));
|
|
346
|
+
actions.push(( (new Separator())));
|
|
347
|
+
const handledEntries = ( (new Set()));
|
|
351
348
|
for (const entry of this.viewModel.entries) {
|
|
352
|
-
if (!( handledEntries.has(entry.id))) {
|
|
353
|
-
actions.push(( new ToggleStatusbarEntryVisibilityAction(entry.id, entry.name, this.viewModel)));
|
|
349
|
+
if (!( (handledEntries.has(entry.id)))) {
|
|
350
|
+
actions.push(( (new ToggleStatusbarEntryVisibilityAction(entry.id, entry.name, this.viewModel))));
|
|
354
351
|
handledEntries.add(entry.id);
|
|
355
352
|
}
|
|
356
353
|
}
|
|
@@ -363,8 +360,8 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
363
360
|
}
|
|
364
361
|
}
|
|
365
362
|
if (statusEntryUnderMouse) {
|
|
366
|
-
actions.push(( new Separator()));
|
|
367
|
-
actions.push(( new HideStatusbarEntryAction(statusEntryUnderMouse.id, statusEntryUnderMouse.name, this.viewModel)));
|
|
363
|
+
actions.push(( (new Separator())));
|
|
364
|
+
actions.push(( (new HideStatusbarEntryAction(statusEntryUnderMouse.id, statusEntryUnderMouse.name, this.viewModel))));
|
|
368
365
|
}
|
|
369
366
|
return actions;
|
|
370
367
|
}
|
|
@@ -431,29 +428,29 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
431
428
|
super.dispose();
|
|
432
429
|
}
|
|
433
430
|
};
|
|
434
|
-
StatusbarPart = StatusbarPart_1 = ( __decorate([
|
|
435
|
-
( __param(1, IInstantiationService)),
|
|
436
|
-
( __param(2, IThemeService)),
|
|
437
|
-
( __param(3, IWorkspaceContextService)),
|
|
438
|
-
( __param(4, IStorageService)),
|
|
439
|
-
( __param(5, IWorkbenchLayoutService)),
|
|
440
|
-
( __param(6, IContextMenuService)),
|
|
441
|
-
( __param(7, IContextKeyService))
|
|
442
|
-
], StatusbarPart));
|
|
431
|
+
StatusbarPart = StatusbarPart_1 = ( (__decorate([
|
|
432
|
+
( (__param(1, IInstantiationService))),
|
|
433
|
+
( (__param(2, IThemeService))),
|
|
434
|
+
( (__param(3, IWorkspaceContextService))),
|
|
435
|
+
( (__param(4, IStorageService))),
|
|
436
|
+
( (__param(5, IWorkbenchLayoutService))),
|
|
437
|
+
( (__param(6, IContextMenuService))),
|
|
438
|
+
( (__param(7, IContextKeyService)))
|
|
439
|
+
], StatusbarPart)));
|
|
443
440
|
let MainStatusbarPart = class MainStatusbarPart extends StatusbarPart {
|
|
444
441
|
constructor(instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService) {
|
|
445
442
|
super("workbench.parts.statusbar" , instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService);
|
|
446
443
|
}
|
|
447
444
|
};
|
|
448
|
-
MainStatusbarPart = ( __decorate([
|
|
449
|
-
( __param(0, IInstantiationService)),
|
|
450
|
-
( __param(1, IThemeService)),
|
|
451
|
-
( __param(2, IWorkspaceContextService)),
|
|
452
|
-
( __param(3, IStorageService)),
|
|
453
|
-
( __param(4, IWorkbenchLayoutService)),
|
|
454
|
-
( __param(5, IContextMenuService)),
|
|
455
|
-
( __param(6, IContextKeyService))
|
|
456
|
-
], MainStatusbarPart));
|
|
445
|
+
MainStatusbarPart = ( (__decorate([
|
|
446
|
+
( (__param(0, IInstantiationService))),
|
|
447
|
+
( (__param(1, IThemeService))),
|
|
448
|
+
( (__param(2, IWorkspaceContextService))),
|
|
449
|
+
( (__param(3, IStorageService))),
|
|
450
|
+
( (__param(4, IWorkbenchLayoutService))),
|
|
451
|
+
( (__param(5, IContextMenuService))),
|
|
452
|
+
( (__param(6, IContextKeyService)))
|
|
453
|
+
], MainStatusbarPart)));
|
|
457
454
|
let AuxiliaryStatusbarPart = class AuxiliaryStatusbarPart extends StatusbarPart {
|
|
458
455
|
static { AuxiliaryStatusbarPart_1 = this; }
|
|
459
456
|
static { this.COUNTER = 1; }
|
|
@@ -464,21 +461,21 @@ let AuxiliaryStatusbarPart = class AuxiliaryStatusbarPart extends StatusbarPart
|
|
|
464
461
|
this.height = StatusbarPart.HEIGHT;
|
|
465
462
|
}
|
|
466
463
|
};
|
|
467
|
-
AuxiliaryStatusbarPart = AuxiliaryStatusbarPart_1 = ( __decorate([
|
|
468
|
-
( __param(1, IInstantiationService)),
|
|
469
|
-
( __param(2, IThemeService)),
|
|
470
|
-
( __param(3, IWorkspaceContextService)),
|
|
471
|
-
( __param(4, IStorageService)),
|
|
472
|
-
( __param(5, IWorkbenchLayoutService)),
|
|
473
|
-
( __param(6, IContextMenuService)),
|
|
474
|
-
( __param(7, IContextKeyService))
|
|
475
|
-
], AuxiliaryStatusbarPart));
|
|
464
|
+
AuxiliaryStatusbarPart = AuxiliaryStatusbarPart_1 = ( (__decorate([
|
|
465
|
+
( (__param(1, IInstantiationService))),
|
|
466
|
+
( (__param(2, IThemeService))),
|
|
467
|
+
( (__param(3, IWorkspaceContextService))),
|
|
468
|
+
( (__param(4, IStorageService))),
|
|
469
|
+
( (__param(5, IWorkbenchLayoutService))),
|
|
470
|
+
( (__param(6, IContextMenuService))),
|
|
471
|
+
( (__param(7, IContextKeyService)))
|
|
472
|
+
], AuxiliaryStatusbarPart)));
|
|
476
473
|
let StatusbarService = class StatusbarService extends MultiWindowParts {
|
|
477
474
|
constructor(instantiationService, storageService, themeService) {
|
|
478
475
|
super('workbench.statusBarService', themeService, storageService);
|
|
479
476
|
this.instantiationService = instantiationService;
|
|
480
477
|
this.mainPart = this._register(this.instantiationService.createInstance(MainStatusbarPart));
|
|
481
|
-
this._onDidCreateAuxiliaryStatusbarPart = this._register(( new Emitter()));
|
|
478
|
+
this._onDidCreateAuxiliaryStatusbarPart = this._register(( (new Emitter())));
|
|
482
479
|
this.onDidCreateAuxiliaryStatusbarPart = this._onDidCreateAuxiliaryStatusbarPart.event;
|
|
483
480
|
this.onDidChangeEntryVisibility = this.mainPart.onDidChangeEntryVisibility;
|
|
484
481
|
this._register(this.registerPart(this.mainPart));
|
|
@@ -508,10 +505,10 @@ let StatusbarService = class StatusbarService extends MultiWindowParts {
|
|
|
508
505
|
return this.mainPart.addEntry(entry, id, alignment, priorityOrLocation);
|
|
509
506
|
}
|
|
510
507
|
doAddEntryToAllWindows(entry, id, alignment, priorityOrLocation = 0) {
|
|
511
|
-
const entryDisposables = ( new DisposableStore());
|
|
512
|
-
const accessors = ( new Set());
|
|
508
|
+
const entryDisposables = ( (new DisposableStore()));
|
|
509
|
+
const accessors = ( (new Set()));
|
|
513
510
|
function addEntry(part) {
|
|
514
|
-
const partDisposables = ( new DisposableStore());
|
|
511
|
+
const partDisposables = ( (new DisposableStore()));
|
|
515
512
|
partDisposables.add(part.onWillDispose(() => partDisposables.dispose()));
|
|
516
513
|
const accessor = partDisposables.add(part.addEntry(entry, id, alignment, priorityOrLocation));
|
|
517
514
|
accessors.add(accessor);
|
|
@@ -553,18 +550,18 @@ let StatusbarService = class StatusbarService extends MultiWindowParts {
|
|
|
553
550
|
return this.activePart.isEntryFocused();
|
|
554
551
|
}
|
|
555
552
|
overrideStyle(style) {
|
|
556
|
-
const disposables = ( new DisposableStore());
|
|
553
|
+
const disposables = ( (new DisposableStore()));
|
|
557
554
|
for (const part of this.parts) {
|
|
558
555
|
disposables.add(part.overrideStyle(style));
|
|
559
556
|
}
|
|
560
557
|
return disposables;
|
|
561
558
|
}
|
|
562
559
|
};
|
|
563
|
-
StatusbarService = ( __decorate([
|
|
564
|
-
( __param(0, IInstantiationService)),
|
|
565
|
-
( __param(1, IStorageService)),
|
|
566
|
-
( __param(2, IThemeService))
|
|
567
|
-
], StatusbarService));
|
|
560
|
+
StatusbarService = ( (__decorate([
|
|
561
|
+
( (__param(0, IInstantiationService))),
|
|
562
|
+
( (__param(1, IStorageService))),
|
|
563
|
+
( (__param(2, IThemeService)))
|
|
564
|
+
], StatusbarService)));
|
|
568
565
|
let ScopedStatusbarService = class ScopedStatusbarService extends Disposable {
|
|
569
566
|
constructor(statusbarEntryContainer, statusbarService) {
|
|
570
567
|
super();
|
|
@@ -606,8 +603,8 @@ let ScopedStatusbarService = class ScopedStatusbarService extends Disposable {
|
|
|
606
603
|
return this.statusbarEntryContainer.overrideStyle(style);
|
|
607
604
|
}
|
|
608
605
|
};
|
|
609
|
-
ScopedStatusbarService = ( __decorate([
|
|
610
|
-
( __param(1, IStatusbarService))
|
|
611
|
-
], ScopedStatusbarService));
|
|
606
|
+
ScopedStatusbarService = ( (__decorate([
|
|
607
|
+
( (__param(1, IStatusbarService)))
|
|
608
|
+
], ScopedStatusbarService)));
|
|
612
609
|
|
|
613
610
|
export { AuxiliaryStatusbarPart, MainStatusbarPart, ScopedStatusbarService, StatusbarService };
|