@codingame/monaco-vscode-api 4.3.0 → 4.3.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/missing-services.js +1 -1
- package/package.json +8 -8
- package/services.js +27 -1
- package/vscode/src/vs/workbench/api/browser/statusBarService.js +96 -0
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +14 -0
- package/vscode/src/vs/workbench/common/contributions.d.ts +1 -6
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +14 -0
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +14 -0
- package/contributions.js +0 -43
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +0 -254
- package/vscode/src/vs/workbench/contrib/codeEditor/common/languageConfigurationExtensionPoint.js +0 -1016
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +0 -296
package/missing-services.js
CHANGED
|
@@ -100,7 +100,7 @@ import { INotebookEditorModelResolverService } from './vscode/src/vs/workbench/c
|
|
|
100
100
|
import { IWorkingCopyEditorService } from './vscode/src/vs/workbench/services/workingCopy/common/workingCopyEditorService.js';
|
|
101
101
|
import { IUserActivityService } from './vscode/src/vs/workbench/services/userActivity/common/userActivityService.js';
|
|
102
102
|
import { ICanonicalUriService } from './vscode/src/vs/platform/workspace/common/canonicalUri.js';
|
|
103
|
-
import { IExtensionStatusBarItemService } from './vscode/src/vs/workbench/api/browser/
|
|
103
|
+
import { IExtensionStatusBarItemService } from './vscode/src/vs/workbench/api/browser/statusBarService.js';
|
|
104
104
|
import { IWorkbenchAssignmentService } from './vscode/src/vs/workbench/services/assignment/common/assignmentService.js';
|
|
105
105
|
import { IChatService } from './vscode/src/vs/workbench/contrib/chat/common/chatService.js';
|
|
106
106
|
import { IEmbedderTerminalService } from './vscode/src/vs/workbench/services/terminal/common/embedderTerminalService.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2",
|
|
4
4
|
"description": "VSCode public API plugged on the monaco editor",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": {
|
|
@@ -97,12 +97,12 @@
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@codingame/monaco-vscode-extensions-service-override": "4.3.
|
|
101
|
-
"@codingame/monaco-vscode-files-service-override": "4.3.
|
|
102
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "4.3.
|
|
103
|
-
"@codingame/monaco-vscode-environment-service-override": "4.3.
|
|
104
|
-
"@codingame/monaco-vscode-layout-service-override": "4.3.
|
|
105
|
-
"@codingame/monaco-vscode-host-service-override": "4.3.
|
|
106
|
-
"@codingame/monaco-vscode-base-service-override": "4.3.
|
|
100
|
+
"@codingame/monaco-vscode-extensions-service-override": "4.3.2",
|
|
101
|
+
"@codingame/monaco-vscode-files-service-override": "4.3.2",
|
|
102
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "4.3.2",
|
|
103
|
+
"@codingame/monaco-vscode-environment-service-override": "4.3.2",
|
|
104
|
+
"@codingame/monaco-vscode-layout-service-override": "4.3.2",
|
|
105
|
+
"@codingame/monaco-vscode-host-service-override": "4.3.2",
|
|
106
|
+
"@codingame/monaco-vscode-base-service-override": "4.3.2"
|
|
107
107
|
}
|
|
108
108
|
}
|
package/services.js
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
import { __decorate, __param } from './external/tslib/tslib.es6.js';
|
|
2
2
|
import './missing-services.js';
|
|
3
|
-
import './
|
|
3
|
+
import './vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js';
|
|
4
|
+
import './vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js';
|
|
5
|
+
import './vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js';
|
|
6
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch.js';
|
|
7
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/menuPreventer.js';
|
|
8
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js';
|
|
9
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js';
|
|
10
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js';
|
|
11
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js';
|
|
12
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js';
|
|
13
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js';
|
|
14
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js';
|
|
15
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js';
|
|
16
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js';
|
|
17
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/editorLineNumberMenu.js';
|
|
18
|
+
import './vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js';
|
|
19
|
+
import './vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js';
|
|
20
|
+
import './vscode/src/vs/workbench/contrib/format/browser/formatModified.js';
|
|
21
|
+
import './vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js';
|
|
22
|
+
import './vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js';
|
|
23
|
+
import './vscode/src/vs/workbench/contrib/codeActions/browser/codeActions.contribution.js';
|
|
24
|
+
import './vscode/src/vs/workbench/contrib/list/browser/list.contribution.js';
|
|
25
|
+
import './vscode/src/vs/workbench/contrib/codeEditor/browser/editorFeatures.js';
|
|
26
|
+
import './vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js';
|
|
27
|
+
import './vscode/src/vs/workbench/contrib/mappedEdits/common/mappedEdits.contribution.js';
|
|
28
|
+
import './vscode/src/vs/workbench/browser/actions/textInputActions.js';
|
|
29
|
+
import './vscode/src/vs/workbench/browser/actions/developerActions.js';
|
|
4
30
|
import './vscode/src/vs/editor/browser/coreCommands.js';
|
|
5
31
|
import './vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js';
|
|
6
32
|
import './vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js';
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { Emitter } from '../../../base/common/event.js';
|
|
3
|
+
import { hash } from '../../../base/common/hash.js';
|
|
4
|
+
import { getCodiconAriaLabel } from '../../../base/common/iconLabels.js';
|
|
5
|
+
import { toDisposable } from '../../../base/common/lifecycle.js';
|
|
6
|
+
import { registerSingleton } from '../../../platform/instantiation/common/extensions.js';
|
|
7
|
+
import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';
|
|
8
|
+
import { STATUS_BAR_WARNING_ITEM_BACKGROUND, STATUS_BAR_ERROR_ITEM_BACKGROUND } from '../../common/theme.js';
|
|
9
|
+
import { IStatusbarService } from '../../services/statusbar/browser/statusbar.js';
|
|
10
|
+
const IExtensionStatusBarItemService = ( createDecorator('IExtensionStatusBarItemService'));
|
|
11
|
+
let ExtensionStatusBarItemService = class ExtensionStatusBarItemService {
|
|
12
|
+
constructor(_statusbarService) {
|
|
13
|
+
this._statusbarService = _statusbarService;
|
|
14
|
+
this._entries = ( new Map());
|
|
15
|
+
this._onDidChange = ( new Emitter());
|
|
16
|
+
this.onDidChange = this._onDidChange.event;
|
|
17
|
+
}
|
|
18
|
+
dispose() {
|
|
19
|
+
this._entries.forEach(entry => entry.accessor.dispose());
|
|
20
|
+
this._entries.clear();
|
|
21
|
+
this._onDidChange.dispose();
|
|
22
|
+
}
|
|
23
|
+
setOrUpdateEntry(entryId, id, extensionId, name, text, tooltip, command, color, backgroundColor, alignLeft, priority, accessibilityInformation) {
|
|
24
|
+
let ariaLabel;
|
|
25
|
+
let role = undefined;
|
|
26
|
+
if (accessibilityInformation) {
|
|
27
|
+
ariaLabel = accessibilityInformation.label;
|
|
28
|
+
role = accessibilityInformation.role;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
ariaLabel = getCodiconAriaLabel(text);
|
|
32
|
+
if (tooltip) {
|
|
33
|
+
const tooltipString = typeof tooltip === 'string' ? tooltip : tooltip.value;
|
|
34
|
+
ariaLabel += `, ${tooltipString}`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
let kind = undefined;
|
|
38
|
+
switch (backgroundColor?.id) {
|
|
39
|
+
case STATUS_BAR_ERROR_ITEM_BACKGROUND:
|
|
40
|
+
case STATUS_BAR_WARNING_ITEM_BACKGROUND:
|
|
41
|
+
kind = backgroundColor.id === STATUS_BAR_ERROR_ITEM_BACKGROUND ? 'error' : 'warning';
|
|
42
|
+
color = undefined;
|
|
43
|
+
backgroundColor = undefined;
|
|
44
|
+
}
|
|
45
|
+
const entry = { name, text, tooltip, command, color, backgroundColor, ariaLabel, role, kind };
|
|
46
|
+
if (typeof priority === 'undefined') {
|
|
47
|
+
priority = 0;
|
|
48
|
+
}
|
|
49
|
+
let alignment = alignLeft ? 0 : 1 ;
|
|
50
|
+
const existingEntry = this._entries.get(entryId);
|
|
51
|
+
if (existingEntry) {
|
|
52
|
+
alignment = existingEntry.alignment;
|
|
53
|
+
priority = existingEntry.priority;
|
|
54
|
+
}
|
|
55
|
+
if (!existingEntry) {
|
|
56
|
+
let entryPriority;
|
|
57
|
+
if (typeof extensionId === 'string') {
|
|
58
|
+
entryPriority = { primary: priority, secondary: hash(extensionId) };
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
entryPriority = priority;
|
|
62
|
+
}
|
|
63
|
+
const accessor = this._statusbarService.addEntry(entry, id, alignment, entryPriority);
|
|
64
|
+
this._entries.set(entryId, {
|
|
65
|
+
accessor,
|
|
66
|
+
entry,
|
|
67
|
+
alignment,
|
|
68
|
+
priority,
|
|
69
|
+
disposable: toDisposable(() => {
|
|
70
|
+
accessor.dispose();
|
|
71
|
+
this._entries.delete(entryId);
|
|
72
|
+
this._onDidChange.fire({ removed: entryId });
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
this._onDidChange.fire({ added: [entryId, { entry, alignment, priority }] });
|
|
76
|
+
return 0 ;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
existingEntry.accessor.update(entry);
|
|
80
|
+
existingEntry.entry = entry;
|
|
81
|
+
return 1 ;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
unsetEntry(entryId) {
|
|
85
|
+
this._entries.get(entryId)?.disposable.dispose();
|
|
86
|
+
this._entries.delete(entryId);
|
|
87
|
+
}
|
|
88
|
+
getEntries() {
|
|
89
|
+
return this._entries.entries();
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
ExtensionStatusBarItemService = ( __decorate([
|
|
93
|
+
( __param(0, IStatusbarService))
|
|
94
|
+
], ExtensionStatusBarItemService));
|
|
95
|
+
registerSingleton(IExtensionStatusBarItemService, ExtensionStatusBarItemService, 1 );
|
|
96
|
+
export { ExtensionStatusBarItemService, IExtensionStatusBarItemService };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
1
2
|
import { localizeWithPath } from '../../../nls.js';
|
|
2
3
|
import { ExtensionsRegistry } from '../../services/extensions/common/extensionsRegistry.js';
|
|
3
4
|
import { joinPath, isEqualOrParent } from '../../../base/common/resources.js';
|
|
@@ -7,6 +8,8 @@ import { Extensions } from '../../services/extensionManagement/common/extensionF
|
|
|
7
8
|
import { Registry } from '../../../platform/registry/common/platform.js';
|
|
8
9
|
import { SyncDescriptor } from '../../../platform/instantiation/common/descriptors.js';
|
|
9
10
|
import { MarkdownString } from '../../../base/common/htmlContent.js';
|
|
11
|
+
import { registerWorkbenchContribution2 } from '../../common/contributions.js';
|
|
12
|
+
import { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';
|
|
10
13
|
const configurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
11
14
|
extensionPoint: 'jsonValidation',
|
|
12
15
|
defaultExtensionKind: ['workspace', 'web'],
|
|
@@ -162,4 +165,15 @@ class JSONValidationDataRenderer extends Disposable {
|
|
|
162
165
|
},
|
|
163
166
|
renderer: ( new SyncDescriptor(JSONValidationDataRenderer)),
|
|
164
167
|
});
|
|
168
|
+
let JSONValidationExtensionPointWorkbenchContribution = class JSONValidationExtensionPointWorkbenchContribution {
|
|
169
|
+
static { this.ID = 'workbench.contrib.jsonValidationExtensionPoint'; }
|
|
170
|
+
constructor(instantiationService) {
|
|
171
|
+
this.instantiationService = instantiationService;
|
|
172
|
+
this.instantiationService.createInstance(JSONValidationExtensionPoint);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
JSONValidationExtensionPointWorkbenchContribution = ( __decorate([
|
|
176
|
+
( __param(0, IInstantiationService))
|
|
177
|
+
], JSONValidationExtensionPointWorkbenchContribution));
|
|
178
|
+
registerWorkbenchContribution2(JSONValidationExtensionPointWorkbenchContribution.ID, JSONValidationExtensionPointWorkbenchContribution, 1 );
|
|
165
179
|
export { JSONValidationExtensionPoint };
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A workbench contribution that will be loaded when the workbench starts and disposed when the workbench shuts down.
|
|
3
|
-
*/
|
|
4
|
-
interface IWorkbenchContribution {
|
|
5
|
-
}
|
|
6
1
|
declare const enum WorkbenchPhase {
|
|
7
2
|
/**
|
|
8
3
|
* The first phase signals that we are about to startup getting ready.
|
|
@@ -47,4 +42,4 @@ interface IOnEditorWorkbenchContributionInstantiation {
|
|
|
47
42
|
}
|
|
48
43
|
type WorkbenchContributionInstantiation = WorkbenchPhase | ILazyWorkbenchContributionInstantiation | IOnEditorWorkbenchContributionInstantiation;
|
|
49
44
|
|
|
50
|
-
export { type ILazyWorkbenchContributionInstantiation, type IOnEditorWorkbenchContributionInstantiation, type
|
|
45
|
+
export { type ILazyWorkbenchContributionInstantiation, type IOnEditorWorkbenchContributionInstantiation, type WorkbenchContributionInstantiation, WorkbenchPhase };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
1
2
|
import { localizeWithPath } from '../../../../nls.js';
|
|
2
3
|
import { ExtensionsRegistry } from '../../extensions/common/extensionsRegistry.js';
|
|
3
4
|
import { Extensions as Extensions$1 } from '../../../../platform/theme/common/colorUtils.js';
|
|
@@ -17,6 +18,8 @@ import { Disposable } from '../../../../base/common/lifecycle.js';
|
|
|
17
18
|
import { Extensions } from '../../extensionManagement/common/extensionFeatures.js';
|
|
18
19
|
import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js';
|
|
19
20
|
import { MarkdownString } from '../../../../base/common/htmlContent.js';
|
|
21
|
+
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
22
|
+
import { registerWorkbenchContribution2 } from '../../../common/contributions.js';
|
|
20
23
|
const colorRegistry = ( Registry.as(Extensions$1.ColorContribution));
|
|
21
24
|
const colorReferenceSchema = colorRegistry.getColorReferenceSchema();
|
|
22
25
|
const colorIdPattern = '^\\w+[.\\w+]*$';
|
|
@@ -278,4 +281,15 @@ class ColorDataRenderer extends Disposable {
|
|
|
278
281
|
},
|
|
279
282
|
renderer: ( new SyncDescriptor(ColorDataRenderer)),
|
|
280
283
|
});
|
|
284
|
+
let ColorExtensionPointWorkbenchContribution = class ColorExtensionPointWorkbenchContribution {
|
|
285
|
+
static { this.ID = 'workbench.contrib.colorExtensionPoint'; }
|
|
286
|
+
constructor(instantiationService) {
|
|
287
|
+
this.instantiationService = instantiationService;
|
|
288
|
+
this.instantiationService.createInstance(ColorExtensionPoint);
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
ColorExtensionPointWorkbenchContribution = ( __decorate([
|
|
292
|
+
( __param(0, IInstantiationService))
|
|
293
|
+
], ColorExtensionPointWorkbenchContribution));
|
|
294
|
+
registerWorkbenchContribution2(ColorExtensionPointWorkbenchContribution.ID, ColorExtensionPointWorkbenchContribution, 1 );
|
|
281
295
|
export { ColorExtensionPoint };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
1
2
|
import { localizeWithPath } from '../../../../nls.js';
|
|
2
3
|
import { ExtensionsRegistry } from '../../extensions/common/extensionsRegistry.js';
|
|
3
4
|
import { Extensions } from '../../../../platform/theme/common/iconRegistry.js';
|
|
@@ -5,6 +6,8 @@ import { Registry } from '../../../../platform/registry/common/platform.js';
|
|
|
5
6
|
import { ThemeIcon } from '../../../../base/common/themables.js';
|
|
6
7
|
import { joinPath, isEqualOrParent } from '../../../../base/common/resources.js';
|
|
7
8
|
import { extname, posix } from '../../../../base/common/path.js';
|
|
9
|
+
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
10
|
+
import { registerWorkbenchContribution2 } from '../../../common/contributions.js';
|
|
8
11
|
const iconRegistry = ( Registry.as(Extensions.IconContribution));
|
|
9
12
|
const iconReferenceSchema = iconRegistry.getIconReferenceSchema();
|
|
10
13
|
const iconIdPattern = `^${ThemeIcon.iconNameSegment}(-${ThemeIcon.iconNameSegment})+$`;
|
|
@@ -177,4 +180,15 @@ const formatMap = {
|
|
|
177
180
|
function getFontId(description, fontPath) {
|
|
178
181
|
return posix.join(description.identifier.value, fontPath);
|
|
179
182
|
}
|
|
183
|
+
let ColorExtensionPointWorkbenchContribution = class ColorExtensionPointWorkbenchContribution {
|
|
184
|
+
static { this.ID = 'workbench.contrib.iconExtensionPoint'; }
|
|
185
|
+
constructor(instantiationService) {
|
|
186
|
+
this.instantiationService = instantiationService;
|
|
187
|
+
this.instantiationService.createInstance(IconExtensionPoint);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
ColorExtensionPointWorkbenchContribution = ( __decorate([
|
|
191
|
+
( __param(0, IInstantiationService))
|
|
192
|
+
], ColorExtensionPointWorkbenchContribution));
|
|
193
|
+
registerWorkbenchContribution2(ColorExtensionPointWorkbenchContribution.ID, ColorExtensionPointWorkbenchContribution, 1 );
|
|
180
194
|
export { IconExtensionPoint };
|
package/contributions.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from './external/tslib/tslib.es6.js';
|
|
2
|
-
import { IInstantiationService } from './vscode/src/vs/platform/instantiation/common/instantiation.js';
|
|
3
|
-
import { JSONValidationExtensionPoint } from './vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js';
|
|
4
|
-
import { registerWorkbenchContribution2 } from './vscode/src/vs/workbench/common/contributions.js';
|
|
5
|
-
import { ColorExtensionPoint } from './vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js';
|
|
6
|
-
import { IconExtensionPoint } from './vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js';
|
|
7
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch.js';
|
|
8
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/menuPreventer.js';
|
|
9
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js';
|
|
10
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js';
|
|
11
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js';
|
|
12
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js';
|
|
13
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js';
|
|
14
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js';
|
|
15
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js';
|
|
16
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js';
|
|
17
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js';
|
|
18
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/editorLineNumberMenu.js';
|
|
19
|
-
import './vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js';
|
|
20
|
-
import './vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js';
|
|
21
|
-
import './vscode/src/vs/workbench/contrib/format/browser/formatModified.js';
|
|
22
|
-
import './vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js';
|
|
23
|
-
import './vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js';
|
|
24
|
-
import './vscode/src/vs/workbench/contrib/codeActions/browser/codeActions.contribution.js';
|
|
25
|
-
import './vscode/src/vs/workbench/contrib/list/browser/list.contribution.js';
|
|
26
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/editorFeatures.js';
|
|
27
|
-
import './vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js';
|
|
28
|
-
import './vscode/src/vs/workbench/contrib/mappedEdits/common/mappedEdits.contribution.js';
|
|
29
|
-
import './vscode/src/vs/workbench/browser/actions/textInputActions.js';
|
|
30
|
-
import './vscode/src/vs/workbench/browser/actions/developerActions.js';
|
|
31
|
-
let ExtensionPoints = class ExtensionPoints {
|
|
32
|
-
constructor(instantiationService) {
|
|
33
|
-
this.instantiationService = instantiationService;
|
|
34
|
-
this.instantiationService.createInstance(JSONValidationExtensionPoint);
|
|
35
|
-
this.instantiationService.createInstance(ColorExtensionPoint);
|
|
36
|
-
this.instantiationService.createInstance(IconExtensionPoint);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
ExtensionPoints.ID = 'workbench.contrib.extensionPoints.main';
|
|
40
|
-
ExtensionPoints = __decorate([
|
|
41
|
-
( __param(0, IInstantiationService))
|
|
42
|
-
], ExtensionPoints);
|
|
43
|
-
registerWorkbenchContribution2(ExtensionPoints.ID, ExtensionPoints, 1 );
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { toDisposable, DisposableStore } from '../../../base/common/lifecycle.js';
|
|
3
|
-
import { localizeWithPath } from '../../../nls.js';
|
|
4
|
-
import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';
|
|
5
|
-
import { isProposedApiEnabled } from '../../services/extensions/common/extensions.js';
|
|
6
|
-
import { ExtensionsRegistry } from '../../services/extensions/common/extensionsRegistry.js';
|
|
7
|
-
import { IStatusbarService } from '../../services/statusbar/browser/statusbar.js';
|
|
8
|
-
import { isAccessibilityInformation } from '../../../platform/accessibility/common/accessibility.js';
|
|
9
|
-
import { getCodiconAriaLabel } from '../../../base/common/iconLabels.js';
|
|
10
|
-
import { hash } from '../../../base/common/hash.js';
|
|
11
|
-
import { Emitter } from '../../../base/common/event.js';
|
|
12
|
-
import { registerSingleton } from '../../../platform/instantiation/common/extensions.js';
|
|
13
|
-
import { Iterable } from '../../../base/common/iterator.js';
|
|
14
|
-
import { ExtensionIdentifier } from '../../../platform/extensions/common/extensions.js';
|
|
15
|
-
import { asStatusBarItemIdentifier } from '../common/extHostTypes.js';
|
|
16
|
-
import { STATUS_BAR_WARNING_ITEM_BACKGROUND, STATUS_BAR_ERROR_ITEM_BACKGROUND } from '../../common/theme.js';
|
|
17
|
-
const IExtensionStatusBarItemService = ( createDecorator('IExtensionStatusBarItemService'));
|
|
18
|
-
let ExtensionStatusBarItemService = class ExtensionStatusBarItemService {
|
|
19
|
-
constructor(_statusbarService) {
|
|
20
|
-
this._statusbarService = _statusbarService;
|
|
21
|
-
this._entries = ( new Map());
|
|
22
|
-
this._onDidChange = ( new Emitter());
|
|
23
|
-
this.onDidChange = this._onDidChange.event;
|
|
24
|
-
}
|
|
25
|
-
dispose() {
|
|
26
|
-
this._entries.forEach(entry => entry.accessor.dispose());
|
|
27
|
-
this._entries.clear();
|
|
28
|
-
this._onDidChange.dispose();
|
|
29
|
-
}
|
|
30
|
-
setOrUpdateEntry(entryId, id, extensionId, name, text, tooltip, command, color, backgroundColor, alignLeft, priority, accessibilityInformation) {
|
|
31
|
-
let ariaLabel;
|
|
32
|
-
let role = undefined;
|
|
33
|
-
if (accessibilityInformation) {
|
|
34
|
-
ariaLabel = accessibilityInformation.label;
|
|
35
|
-
role = accessibilityInformation.role;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
ariaLabel = getCodiconAriaLabel(text);
|
|
39
|
-
if (tooltip) {
|
|
40
|
-
const tooltipString = typeof tooltip === 'string' ? tooltip : tooltip.value;
|
|
41
|
-
ariaLabel += `, ${tooltipString}`;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
let kind = undefined;
|
|
45
|
-
switch (backgroundColor?.id) {
|
|
46
|
-
case STATUS_BAR_ERROR_ITEM_BACKGROUND:
|
|
47
|
-
case STATUS_BAR_WARNING_ITEM_BACKGROUND:
|
|
48
|
-
kind = backgroundColor.id === STATUS_BAR_ERROR_ITEM_BACKGROUND ? 'error' : 'warning';
|
|
49
|
-
color = undefined;
|
|
50
|
-
backgroundColor = undefined;
|
|
51
|
-
}
|
|
52
|
-
const entry = { name, text, tooltip, command, color, backgroundColor, ariaLabel, role, kind };
|
|
53
|
-
if (typeof priority === 'undefined') {
|
|
54
|
-
priority = 0;
|
|
55
|
-
}
|
|
56
|
-
let alignment = alignLeft ? 0 : 1 ;
|
|
57
|
-
const existingEntry = this._entries.get(entryId);
|
|
58
|
-
if (existingEntry) {
|
|
59
|
-
alignment = existingEntry.alignment;
|
|
60
|
-
priority = existingEntry.priority;
|
|
61
|
-
}
|
|
62
|
-
if (!existingEntry) {
|
|
63
|
-
let entryPriority;
|
|
64
|
-
if (typeof extensionId === 'string') {
|
|
65
|
-
entryPriority = { primary: priority, secondary: hash(extensionId) };
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
entryPriority = priority;
|
|
69
|
-
}
|
|
70
|
-
const accessor = this._statusbarService.addEntry(entry, id, alignment, entryPriority);
|
|
71
|
-
this._entries.set(entryId, {
|
|
72
|
-
accessor,
|
|
73
|
-
entry,
|
|
74
|
-
alignment,
|
|
75
|
-
priority,
|
|
76
|
-
disposable: toDisposable(() => {
|
|
77
|
-
accessor.dispose();
|
|
78
|
-
this._entries.delete(entryId);
|
|
79
|
-
this._onDidChange.fire({ removed: entryId });
|
|
80
|
-
})
|
|
81
|
-
});
|
|
82
|
-
this._onDidChange.fire({ added: [entryId, { entry, alignment, priority }] });
|
|
83
|
-
return 0 ;
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
existingEntry.accessor.update(entry);
|
|
87
|
-
existingEntry.entry = entry;
|
|
88
|
-
return 1 ;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
unsetEntry(entryId) {
|
|
92
|
-
this._entries.get(entryId)?.disposable.dispose();
|
|
93
|
-
this._entries.delete(entryId);
|
|
94
|
-
}
|
|
95
|
-
getEntries() {
|
|
96
|
-
return this._entries.entries();
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
ExtensionStatusBarItemService = ( __decorate([
|
|
100
|
-
( __param(0, IStatusbarService))
|
|
101
|
-
], ExtensionStatusBarItemService));
|
|
102
|
-
registerSingleton(IExtensionStatusBarItemService, ExtensionStatusBarItemService, 1 );
|
|
103
|
-
function isUserFriendlyStatusItemEntry(candidate) {
|
|
104
|
-
const obj = candidate;
|
|
105
|
-
return (typeof obj.id === 'string' && obj.id.length > 0)
|
|
106
|
-
&& typeof obj.name === 'string'
|
|
107
|
-
&& typeof obj.text === 'string'
|
|
108
|
-
&& (obj.alignment === 'left' || obj.alignment === 'right')
|
|
109
|
-
&& (obj.command === undefined || typeof obj.command === 'string')
|
|
110
|
-
&& (obj.tooltip === undefined || typeof obj.tooltip === 'string')
|
|
111
|
-
&& (obj.priority === undefined || typeof obj.priority === 'number')
|
|
112
|
-
&& (obj.accessibilityInformation === undefined || isAccessibilityInformation(obj.accessibilityInformation));
|
|
113
|
-
}
|
|
114
|
-
const statusBarItemSchema = {
|
|
115
|
-
type: 'object',
|
|
116
|
-
required: ['id', 'text', 'alignment', 'name'],
|
|
117
|
-
properties: {
|
|
118
|
-
id: {
|
|
119
|
-
type: 'string',
|
|
120
|
-
markdownDescription: ( localizeWithPath(
|
|
121
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
122
|
-
'id',
|
|
123
|
-
'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'
|
|
124
|
-
))
|
|
125
|
-
},
|
|
126
|
-
name: {
|
|
127
|
-
type: 'string',
|
|
128
|
-
description: ( localizeWithPath(
|
|
129
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
130
|
-
'name',
|
|
131
|
-
'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.'
|
|
132
|
-
))
|
|
133
|
-
},
|
|
134
|
-
text: {
|
|
135
|
-
type: 'string',
|
|
136
|
-
description: ( localizeWithPath(
|
|
137
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
138
|
-
'text',
|
|
139
|
-
'The text to show for the entry. You can embed icons in the text by leveraging the `$(<name>)`-syntax, like \'Hello $(globe)!\''
|
|
140
|
-
))
|
|
141
|
-
},
|
|
142
|
-
tooltip: {
|
|
143
|
-
type: 'string',
|
|
144
|
-
description: ( localizeWithPath(
|
|
145
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
146
|
-
'tooltip',
|
|
147
|
-
'The tooltip text for the entry.'
|
|
148
|
-
))
|
|
149
|
-
},
|
|
150
|
-
command: {
|
|
151
|
-
type: 'string',
|
|
152
|
-
description: ( localizeWithPath(
|
|
153
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
154
|
-
'command',
|
|
155
|
-
'The command to execute when the status bar entry is clicked.'
|
|
156
|
-
))
|
|
157
|
-
},
|
|
158
|
-
alignment: {
|
|
159
|
-
type: 'string',
|
|
160
|
-
enum: ['left', 'right'],
|
|
161
|
-
description: ( localizeWithPath(
|
|
162
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
163
|
-
'alignment',
|
|
164
|
-
'The alignment of the status bar entry.'
|
|
165
|
-
))
|
|
166
|
-
},
|
|
167
|
-
priority: {
|
|
168
|
-
type: 'number',
|
|
169
|
-
description: ( localizeWithPath(
|
|
170
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
171
|
-
'priority',
|
|
172
|
-
'The priority of the status bar entry. Higher value means the item should be shown more to the left.'
|
|
173
|
-
))
|
|
174
|
-
},
|
|
175
|
-
accessibilityInformation: {
|
|
176
|
-
type: 'object',
|
|
177
|
-
description: ( localizeWithPath(
|
|
178
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
179
|
-
'accessibilityInformation',
|
|
180
|
-
'Defines the role and aria label to be used when the status bar entry is focused.'
|
|
181
|
-
)),
|
|
182
|
-
properties: {
|
|
183
|
-
role: {
|
|
184
|
-
type: 'string',
|
|
185
|
-
description: ( localizeWithPath(
|
|
186
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
187
|
-
'accessibilityInformation.role',
|
|
188
|
-
'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'
|
|
189
|
-
))
|
|
190
|
-
},
|
|
191
|
-
label: {
|
|
192
|
-
type: 'string',
|
|
193
|
-
description: ( localizeWithPath(
|
|
194
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
195
|
-
'accessibilityInformation.label',
|
|
196
|
-
'The aria label of the status bar entry. Defaults to the entry\'s text.'
|
|
197
|
-
))
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
const statusBarItemsSchema = {
|
|
204
|
-
description: ( localizeWithPath(
|
|
205
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
206
|
-
'vscode.extension.contributes.statusBarItems',
|
|
207
|
-
"Contributes items to the status bar."
|
|
208
|
-
)),
|
|
209
|
-
oneOf: [
|
|
210
|
-
statusBarItemSchema,
|
|
211
|
-
{
|
|
212
|
-
type: 'array',
|
|
213
|
-
items: statusBarItemSchema
|
|
214
|
-
}
|
|
215
|
-
]
|
|
216
|
-
};
|
|
217
|
-
const statusBarItemsExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
218
|
-
extensionPoint: 'statusBarItems',
|
|
219
|
-
jsonSchema: statusBarItemsSchema,
|
|
220
|
-
});
|
|
221
|
-
let StatusBarItemsExtensionPoint = class StatusBarItemsExtensionPoint {
|
|
222
|
-
constructor(statusBarItemsService) {
|
|
223
|
-
const contributions = ( new DisposableStore());
|
|
224
|
-
statusBarItemsExtensionPoint.setHandler((extensions) => {
|
|
225
|
-
contributions.clear();
|
|
226
|
-
for (const entry of extensions) {
|
|
227
|
-
if (!isProposedApiEnabled(entry.description, 'contribStatusBarItems')) {
|
|
228
|
-
entry.collector.error(`The ${statusBarItemsExtensionPoint.name} is proposed API`);
|
|
229
|
-
continue;
|
|
230
|
-
}
|
|
231
|
-
const { value, collector } = entry;
|
|
232
|
-
for (const candidate of Iterable.wrap(value)) {
|
|
233
|
-
if (!isUserFriendlyStatusItemEntry(candidate)) {
|
|
234
|
-
collector.error(( localizeWithPath(
|
|
235
|
-
'vs/workbench/api/browser/statusBarExtensionPoint',
|
|
236
|
-
'invalid',
|
|
237
|
-
"Invalid status bar item contribution."
|
|
238
|
-
)));
|
|
239
|
-
continue;
|
|
240
|
-
}
|
|
241
|
-
const fullItemId = asStatusBarItemIdentifier(entry.description.identifier, candidate.id);
|
|
242
|
-
const kind = statusBarItemsService.setOrUpdateEntry(fullItemId, fullItemId, ExtensionIdentifier.toKey(entry.description.identifier), candidate.name ?? entry.description.displayName ?? entry.description.name, candidate.text, candidate.tooltip, candidate.command ? { id: candidate.command, title: candidate.name } : undefined, undefined, undefined, candidate.alignment === 'left', candidate.priority, candidate.accessibilityInformation);
|
|
243
|
-
if (kind === 0 ) {
|
|
244
|
-
contributions.add(toDisposable(() => statusBarItemsService.unsetEntry(fullItemId)));
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
StatusBarItemsExtensionPoint = ( __decorate([
|
|
252
|
-
( __param(0, IExtensionStatusBarItemService))
|
|
253
|
-
], StatusBarItemsExtensionPoint));
|
|
254
|
-
export { ExtensionStatusBarItemService, IExtensionStatusBarItemService, StatusBarItemsExtensionPoint };
|