@codingame/monaco-vscode-api 4.3.1 → 4.4.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/missing-services.js +1 -1
- package/monaco.d.ts +2 -0
- package/monaco.js +1 -0
- package/package.json +8 -8
- package/services.js +27 -1
- package/vscode/src/vs/editor/browser/editorExtensions.d.ts +138 -0
- package/vscode/src/vs/editor/common/editorCommon.d.ts +11 -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/monaco.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ import { IKeybindingService } from './vscode/src/vs/platform/keybinding/common/k
|
|
|
19
19
|
import { KeybindingResolver } from './vscode/src/vs/platform/keybinding/common/keybindingResolver.js';
|
|
20
20
|
import { ResolvedKeybindingItem } from './vscode/src/vs/platform/keybinding/common/resolvedKeybindingItem.js';
|
|
21
21
|
import { Event } from './vscode/src/vs/base/common/event.js';
|
|
22
|
+
export { EditorAction, EditorCommand, registerDiffEditorContribution, registerEditorAction, registerEditorContribution, registerMultiEditorAction } from './vscode/src/vs/editor/browser/editorExtensions.js';
|
|
23
|
+
export { IDiffEditorContribution, IEditorContribution } from './vscode/src/vs/editor/common/editorCommon.js';
|
|
22
24
|
|
|
23
25
|
declare function writeFile(uri: URI, content: string): Promise<void>;
|
|
24
26
|
declare function deleteFile(uri: URI, options?: Partial<IFileDeleteOptions>): Promise<void>;
|
package/monaco.js
CHANGED
|
@@ -45,6 +45,7 @@ import { IKeybindingService } from './vscode/src/vs/platform/keybinding/common/k
|
|
|
45
45
|
import { ResourceContextKey } from './vscode/src/vs/workbench/common/contextkeys.js';
|
|
46
46
|
import { createInjectedClass } from './tools/injection.js';
|
|
47
47
|
import { getService } from './services.js';
|
|
48
|
+
export { EditorAction, EditorCommand, registerDiffEditorContribution, registerEditorAction, registerEditorContribution, registerMultiEditorAction } from './vscode/src/vs/editor/browser/editorExtensions.js';
|
|
48
49
|
function computeConfiguration(configuration, overrides) {
|
|
49
50
|
const editorConfiguration = isObject(configuration.editor) ? deepClone(configuration.editor) : Object.create(null);
|
|
50
51
|
Object.assign(editorConfiguration, deepClone(overrides));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
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-
|
|
101
|
-
"@codingame/monaco-vscode-files-service-override": "4.
|
|
102
|
-
"@codingame/monaco-vscode-
|
|
103
|
-
"@codingame/monaco-vscode-environment-service-override": "4.
|
|
104
|
-
"@codingame/monaco-vscode-layout-service-override": "4.
|
|
105
|
-
"@codingame/monaco-vscode-host-service-override": "4.
|
|
106
|
-
"@codingame/monaco-vscode-base-service-override": "4.
|
|
100
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "4.4.0",
|
|
101
|
+
"@codingame/monaco-vscode-files-service-override": "4.4.0",
|
|
102
|
+
"@codingame/monaco-vscode-extensions-service-override": "4.4.0",
|
|
103
|
+
"@codingame/monaco-vscode-environment-service-override": "4.4.0",
|
|
104
|
+
"@codingame/monaco-vscode-layout-service-override": "4.4.0",
|
|
105
|
+
"@codingame/monaco-vscode-host-service-override": "4.4.0",
|
|
106
|
+
"@codingame/monaco-vscode-base-service-override": "4.4.0"
|
|
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,138 @@
|
|
|
1
|
+
import { ICodeEditor, IDiffEditor } from './editorBrowser.js';
|
|
2
|
+
import { IEditorContribution } from '../common/editorCommon.js';
|
|
3
|
+
import '../editor.api.js';
|
|
4
|
+
import { IDisposable } from '../../base/common/lifecycle.js';
|
|
5
|
+
import { ThemeIcon } from '../../base/common/themables.js';
|
|
6
|
+
import { BrandedService, ServicesAccessor as ServicesAccessor$1 } from '../../platform/instantiation/common/instantiation.js';
|
|
7
|
+
import { ContextKeyExpression } from '../../platform/contextkey/common/contextkey.js';
|
|
8
|
+
import { ICommandMetadata } from '../../platform/commands/common/commands.js';
|
|
9
|
+
import { MenuId } from '../../platform/actions/common/actions.js';
|
|
10
|
+
import { IKeybindings } from '../../platform/keybinding/common/keybindingsRegistry.js';
|
|
11
|
+
|
|
12
|
+
type ServicesAccessor = ServicesAccessor$1;
|
|
13
|
+
declare const enum EditorContributionInstantiation {
|
|
14
|
+
/**
|
|
15
|
+
* The contribution is created eagerly when the {@linkcode ICodeEditor} is instantiated.
|
|
16
|
+
* Only Eager contributions can participate in saving or restoring of view state.
|
|
17
|
+
*/
|
|
18
|
+
Eager = 0,
|
|
19
|
+
/**
|
|
20
|
+
* The contribution is created at the latest 50ms after the first render after attaching a text model.
|
|
21
|
+
* If the contribution is explicitly requested via `getContribution`, it will be instantiated sooner.
|
|
22
|
+
* If there is idle time available, it will be instantiated sooner.
|
|
23
|
+
*/
|
|
24
|
+
AfterFirstRender = 1,
|
|
25
|
+
/**
|
|
26
|
+
* The contribution is created before the editor emits events produced by user interaction (mouse events, keyboard events).
|
|
27
|
+
* If the contribution is explicitly requested via `getContribution`, it will be instantiated sooner.
|
|
28
|
+
* If there is idle time available, it will be instantiated sooner.
|
|
29
|
+
*/
|
|
30
|
+
BeforeFirstInteraction = 2,
|
|
31
|
+
/**
|
|
32
|
+
* The contribution is created when there is idle time available, at the latest 5000ms after the editor creation.
|
|
33
|
+
* If the contribution is explicitly requested via `getContribution`, it will be instantiated sooner.
|
|
34
|
+
*/
|
|
35
|
+
Eventually = 3,
|
|
36
|
+
/**
|
|
37
|
+
* The contribution is created only when explicitly requested via `getContribution`.
|
|
38
|
+
*/
|
|
39
|
+
Lazy = 4
|
|
40
|
+
}
|
|
41
|
+
interface ICommandKeybindingsOptions extends IKeybindings {
|
|
42
|
+
kbExpr?: ContextKeyExpression | null;
|
|
43
|
+
weight: number;
|
|
44
|
+
/**
|
|
45
|
+
* the default keybinding arguments
|
|
46
|
+
*/
|
|
47
|
+
args?: any;
|
|
48
|
+
}
|
|
49
|
+
interface ICommandMenuOptions {
|
|
50
|
+
menuId: MenuId;
|
|
51
|
+
group: string;
|
|
52
|
+
order: number;
|
|
53
|
+
when?: ContextKeyExpression;
|
|
54
|
+
title: string;
|
|
55
|
+
icon?: ThemeIcon;
|
|
56
|
+
}
|
|
57
|
+
interface ICommandOptions {
|
|
58
|
+
id: string;
|
|
59
|
+
precondition: ContextKeyExpression | undefined;
|
|
60
|
+
kbOpts?: ICommandKeybindingsOptions | ICommandKeybindingsOptions[];
|
|
61
|
+
metadata?: ICommandMetadata;
|
|
62
|
+
menuOpts?: ICommandMenuOptions | ICommandMenuOptions[];
|
|
63
|
+
}
|
|
64
|
+
declare abstract class Command {
|
|
65
|
+
readonly id: string;
|
|
66
|
+
readonly precondition: ContextKeyExpression | undefined;
|
|
67
|
+
private readonly _kbOpts;
|
|
68
|
+
private readonly _menuOpts;
|
|
69
|
+
readonly metadata: ICommandMetadata | undefined;
|
|
70
|
+
constructor(opts: ICommandOptions);
|
|
71
|
+
register(): void;
|
|
72
|
+
private _registerMenuItem;
|
|
73
|
+
abstract runCommand(accessor: ServicesAccessor, args: any): void | Promise<void>;
|
|
74
|
+
}
|
|
75
|
+
interface IContributionCommandOptions<T> extends ICommandOptions {
|
|
76
|
+
handler: (controller: T, args: any) => void;
|
|
77
|
+
}
|
|
78
|
+
interface EditorControllerCommand<T extends IEditorContribution> {
|
|
79
|
+
new (opts: IContributionCommandOptions<T>): EditorCommand;
|
|
80
|
+
}
|
|
81
|
+
declare abstract class EditorCommand extends Command {
|
|
82
|
+
/**
|
|
83
|
+
* Create a command class that is bound to a certain editor contribution.
|
|
84
|
+
*/
|
|
85
|
+
static bindToContribution<T extends IEditorContribution>(controllerGetter: (editor: ICodeEditor) => T | null): EditorControllerCommand<T>;
|
|
86
|
+
static runEditorCommand(accessor: ServicesAccessor, args: any, precondition: ContextKeyExpression | undefined, runner: (accessor: ServicesAccessor | null, editor: ICodeEditor, args: any) => void | Promise<void>): void | Promise<void>;
|
|
87
|
+
runCommand(accessor: ServicesAccessor, args: any): void | Promise<void>;
|
|
88
|
+
abstract runEditorCommand(accessor: ServicesAccessor | null, editor: ICodeEditor, args: any): void | Promise<void>;
|
|
89
|
+
}
|
|
90
|
+
interface IEditorActionContextMenuOptions {
|
|
91
|
+
group: string;
|
|
92
|
+
order: number;
|
|
93
|
+
when?: ContextKeyExpression;
|
|
94
|
+
menuId?: MenuId;
|
|
95
|
+
}
|
|
96
|
+
interface IActionOptions extends ICommandOptions {
|
|
97
|
+
label: string;
|
|
98
|
+
alias: string;
|
|
99
|
+
contextMenuOpts?: IEditorActionContextMenuOptions | IEditorActionContextMenuOptions[];
|
|
100
|
+
}
|
|
101
|
+
declare abstract class EditorAction extends EditorCommand {
|
|
102
|
+
private static convertOptions;
|
|
103
|
+
readonly label: string;
|
|
104
|
+
readonly alias: string;
|
|
105
|
+
constructor(opts: IActionOptions);
|
|
106
|
+
runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void | Promise<void>;
|
|
107
|
+
protected reportTelemetry(accessor: ServicesAccessor, editor: ICodeEditor): void;
|
|
108
|
+
abstract run(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void | Promise<void>;
|
|
109
|
+
}
|
|
110
|
+
type EditorActionImplementation = (accessor: ServicesAccessor, editor: ICodeEditor, args: any) => boolean | Promise<void>;
|
|
111
|
+
declare class MultiEditorAction extends EditorAction {
|
|
112
|
+
private readonly _implementations;
|
|
113
|
+
/**
|
|
114
|
+
* A higher priority gets to be looked at first
|
|
115
|
+
*/
|
|
116
|
+
addImplementation(priority: number, implementation: EditorActionImplementation): IDisposable;
|
|
117
|
+
run(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void | Promise<void>;
|
|
118
|
+
}
|
|
119
|
+
declare function registerEditorAction<T extends EditorAction>(ctor: {
|
|
120
|
+
new (): T;
|
|
121
|
+
}): T;
|
|
122
|
+
declare function registerMultiEditorAction<T extends MultiEditorAction>(action: T): T;
|
|
123
|
+
/**
|
|
124
|
+
* Registers an editor contribution. Editor contributions have a lifecycle which is bound
|
|
125
|
+
* to a specific code editor instance.
|
|
126
|
+
*/
|
|
127
|
+
declare function registerEditorContribution<Services extends BrandedService[]>(id: string, ctor: {
|
|
128
|
+
new (editor: ICodeEditor, ...services: Services): IEditorContribution;
|
|
129
|
+
}, instantiation: EditorContributionInstantiation): void;
|
|
130
|
+
/**
|
|
131
|
+
* Registers a diff editor contribution. Diff editor contributions have a lifecycle which
|
|
132
|
+
* is bound to a specific diff editor instance.
|
|
133
|
+
*/
|
|
134
|
+
declare function registerDiffEditorContribution<Services extends BrandedService[]>(id: string, ctor: {
|
|
135
|
+
new (editor: IDiffEditor, ...services: Services): IEditorContribution;
|
|
136
|
+
}): void;
|
|
137
|
+
|
|
138
|
+
export { Command, EditorAction, type EditorActionImplementation, EditorCommand, EditorContributionInstantiation, type EditorControllerCommand, type IActionOptions, type ICommandKeybindingsOptions, type ICommandMenuOptions, type ICommandOptions, type IContributionCommandOptions, type IEditorActionContextMenuOptions, MultiEditorAction, type ServicesAccessor, registerDiffEditorContribution, registerEditorAction, registerEditorContribution, registerMultiEditorAction };
|
|
@@ -100,6 +100,16 @@ interface IEditorContribution {
|
|
|
100
100
|
*/
|
|
101
101
|
restoreViewState?(state: any): void;
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* A diff editor contribution that gets created every time a new diffeditor gets created and gets disposed when the diff editor gets disposed.
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
interface IDiffEditorContribution {
|
|
108
|
+
/**
|
|
109
|
+
* Dispose this contribution.
|
|
110
|
+
*/
|
|
111
|
+
dispose(): void;
|
|
112
|
+
}
|
|
103
113
|
/**
|
|
104
114
|
* @internal
|
|
105
115
|
*/
|
|
@@ -181,4 +191,4 @@ interface IDecorationRenderOptions extends IThemeDecorationRenderOptions {
|
|
|
181
191
|
dark?: IThemeDecorationRenderOptions;
|
|
182
192
|
}
|
|
183
193
|
|
|
184
|
-
export type { ICodeEditorViewState, IContentDecorationRenderOptions, ICursorState, IDecorationRenderOptions, IDiffEditor, IDiffEditorModel, IDiffEditorViewModel, IDiffEditorViewState, IEditor, IEditorContribution, IThemeDecorationRenderOptions, IViewState };
|
|
194
|
+
export type { ICodeEditorViewState, IContentDecorationRenderOptions, ICursorState, IDecorationRenderOptions, IDiffEditor, IDiffEditorContribution, IDiffEditorModel, IDiffEditorViewModel, IDiffEditorViewState, IEditor, IEditorContribution, IThemeDecorationRenderOptions, IViewState };
|
|
@@ -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 );
|