@theia/plugin 1.48.1 → 1.48.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/README.md +766 -766
- package/package.json +3 -3
- package/src/package.spec.ts +28 -28
- package/src/theia-extra.d.ts +403 -403
- package/src/theia.d.ts +16546 -16546
- package/src/theia.proposed.canonicalUriProvider.d.ts +64 -64
- package/src/theia.proposed.customEditorMove.d.ts +41 -41
- package/src/theia.proposed.diffCommand.d.ts +55 -55
- package/src/theia.proposed.documentPaste.d.ts +125 -125
- package/src/theia.proposed.dropMetadata.d.ts +75 -75
- package/src/theia.proposed.editSessionIdentityProvider.d.ts +89 -89
- package/src/theia.proposed.extensionsAny.d.ts +57 -57
- package/src/theia.proposed.externalUriOpener.d.ts +158 -158
- package/src/theia.proposed.findTextInFiles.d.ts +178 -178
- package/src/theia.proposed.fsChunks.d.ts +32 -32
- package/src/theia.proposed.multiDocumentHighlightProvider.ts +82 -82
- package/src/theia.proposed.notebookCellExecutionState.d.ts +68 -68
- package/src/theia.proposed.notebookKernelSource.d.ts +62 -62
- package/src/theia.proposed.notebookMessaging.d.ts +84 -84
- package/src/theia.proposed.profileContentHandlers.d.ts +35 -35
- package/src/theia.proposed.resolvers.d.ts +44 -44
- package/src/theia.proposed.scmValidation.d.ts +70 -70
- package/src/theia.proposed.shareProvider.d.ts +92 -92
- package/src/theia.proposed.terminalQuickFixProvider.d.ts +103 -103
- package/src/theia.proposed.textSearchProvider.d.ts +145 -145
- package/src/theia.proposed.timeline.d.ts +177 -177
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2023 TypeFox and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
/*---------------------------------------------------------------------------------------------
|
|
18
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
-
*--------------------------------------------------------------------------------------------*/
|
|
21
|
-
// code copied and modified from https://github.com/microsoft/vscode/blob/1.79.0/src/vscode-dts/vscode.proposed.dropMetadata.d.ts
|
|
22
|
-
|
|
23
|
-
export module '@theia/plugin' {
|
|
24
|
-
|
|
25
|
-
// https://github.com/microsoft/vscode/issues/179430
|
|
26
|
-
|
|
27
|
-
export interface DocumentDropEdit {
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Human readable label that describes the edit.
|
|
31
|
-
*/
|
|
32
|
-
label?: string;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The mime type from the {@link DataTransfer} that this edit applies.
|
|
36
|
-
*/
|
|
37
|
-
handledMimeType?: string;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
|
|
41
|
-
*/
|
|
42
|
-
yieldTo?: ReadonlyArray<
|
|
43
|
-
| { readonly extensionId: string; readonly providerId: string }
|
|
44
|
-
| { readonly mimeType: string }
|
|
45
|
-
>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface DocumentDropEditProviderMetadata {
|
|
49
|
-
/**
|
|
50
|
-
* Identifies the provider.
|
|
51
|
-
*
|
|
52
|
-
* This id is used when users configure the default provider for drop.
|
|
53
|
-
*
|
|
54
|
-
* This id should be unique within the extension but does not need to be unique across extensions.
|
|
55
|
-
*/
|
|
56
|
-
readonly id: string;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* List of data transfer types that the provider supports.
|
|
60
|
-
*
|
|
61
|
-
* This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
|
|
62
|
-
*
|
|
63
|
-
* Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
|
|
64
|
-
*
|
|
65
|
-
* Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
|
|
66
|
-
* Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
|
|
67
|
-
* from the operating system.
|
|
68
|
-
*/
|
|
69
|
-
readonly dropMimeTypes: readonly string[];
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export namespace languages {
|
|
73
|
-
export function registerDocumentDropEditProvider(selector: DocumentSelector, provider: DocumentDropEditProvider, metadata?: DocumentDropEditProviderMetadata): Disposable;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2023 TypeFox and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
/*---------------------------------------------------------------------------------------------
|
|
18
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
+
*--------------------------------------------------------------------------------------------*/
|
|
21
|
+
// code copied and modified from https://github.com/microsoft/vscode/blob/1.79.0/src/vscode-dts/vscode.proposed.dropMetadata.d.ts
|
|
22
|
+
|
|
23
|
+
export module '@theia/plugin' {
|
|
24
|
+
|
|
25
|
+
// https://github.com/microsoft/vscode/issues/179430
|
|
26
|
+
|
|
27
|
+
export interface DocumentDropEdit {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Human readable label that describes the edit.
|
|
31
|
+
*/
|
|
32
|
+
label?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The mime type from the {@link DataTransfer} that this edit applies.
|
|
36
|
+
*/
|
|
37
|
+
handledMimeType?: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
|
|
41
|
+
*/
|
|
42
|
+
yieldTo?: ReadonlyArray<
|
|
43
|
+
| { readonly extensionId: string; readonly providerId: string }
|
|
44
|
+
| { readonly mimeType: string }
|
|
45
|
+
>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface DocumentDropEditProviderMetadata {
|
|
49
|
+
/**
|
|
50
|
+
* Identifies the provider.
|
|
51
|
+
*
|
|
52
|
+
* This id is used when users configure the default provider for drop.
|
|
53
|
+
*
|
|
54
|
+
* This id should be unique within the extension but does not need to be unique across extensions.
|
|
55
|
+
*/
|
|
56
|
+
readonly id: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* List of data transfer types that the provider supports.
|
|
60
|
+
*
|
|
61
|
+
* This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
|
|
62
|
+
*
|
|
63
|
+
* Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
|
|
64
|
+
*
|
|
65
|
+
* Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
|
|
66
|
+
* Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
|
|
67
|
+
* from the operating system.
|
|
68
|
+
*/
|
|
69
|
+
readonly dropMimeTypes: readonly string[];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export namespace languages {
|
|
73
|
+
export function registerDocumentDropEditProvider(selector: DocumentSelector, provider: DocumentDropEditProvider, metadata?: DocumentDropEditProviderMetadata): Disposable;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2023 Ericsson and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
/*---------------------------------------------------------------------------------------------
|
|
18
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
-
*--------------------------------------------------------------------------------------------*/
|
|
21
|
-
// code copied and modified from https://github.com/microsoft/vscode/blob/1.77.0/src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts
|
|
22
|
-
|
|
23
|
-
export module '@theia/plugin' {
|
|
24
|
-
|
|
25
|
-
// https://github.com/microsoft/vscode/issues/157734
|
|
26
|
-
|
|
27
|
-
export namespace workspace {
|
|
28
|
-
/**
|
|
29
|
-
* An event that is emitted when an edit session identity is about to be requested.
|
|
30
|
-
*/
|
|
31
|
-
export const onWillCreateEditSessionIdentity: Event<EditSessionIdentityWillCreateEvent>;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* @param scheme The URI scheme that this provider can provide edit session identities for.
|
|
36
|
-
* @param provider A provider which can convert URIs for workspace folders of scheme @param scheme to
|
|
37
|
-
* an edit session identifier which is stable across machines. This enables edit sessions to be resolved.
|
|
38
|
-
*/
|
|
39
|
-
export function registerEditSessionIdentityProvider(scheme: string, provider: EditSessionIdentityProvider): Disposable;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface EditSessionIdentityProvider {
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param workspaceFolder The workspace folder to provide an edit session identity for.
|
|
46
|
-
* @param token A cancellation token for the request.
|
|
47
|
-
* @returns A string representing the edit session identity for the requested workspace folder.
|
|
48
|
-
*/
|
|
49
|
-
provideEditSessionIdentity(workspaceFolder: WorkspaceFolder, token: CancellationToken): ProviderResult<string>;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @param identity1 An edit session identity.
|
|
54
|
-
* @param identity2 A second edit session identity to compare to @param identity1.
|
|
55
|
-
* @param token A cancellation token for the request.
|
|
56
|
-
* @returns An {@link EditSessionIdentityMatch} representing the edit session identity match confidence for the provided identities.
|
|
57
|
-
*/
|
|
58
|
-
provideEditSessionIdentityMatch(identity1: string, identity2: string, token: CancellationToken): ProviderResult<EditSessionIdentityMatch>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export enum EditSessionIdentityMatch {
|
|
62
|
-
Complete = 100,
|
|
63
|
-
Partial = 50,
|
|
64
|
-
None = 0
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface EditSessionIdentityWillCreateEvent {
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* A cancellation token.
|
|
71
|
-
*/
|
|
72
|
-
readonly token: CancellationToken;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* The workspace folder to create an edit session identity for.
|
|
76
|
-
*/
|
|
77
|
-
readonly workspaceFolder: WorkspaceFolder;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Allows to pause the event until the provided thenable resolves.
|
|
81
|
-
*
|
|
82
|
-
* *Note:* This function can only be called during event dispatch.
|
|
83
|
-
*
|
|
84
|
-
* @param thenable A thenable that delays saving.
|
|
85
|
-
*/
|
|
86
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
87
|
-
waitUntil(thenable: Thenable<any>): void;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2023 Ericsson and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
/*---------------------------------------------------------------------------------------------
|
|
18
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
+
*--------------------------------------------------------------------------------------------*/
|
|
21
|
+
// code copied and modified from https://github.com/microsoft/vscode/blob/1.77.0/src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts
|
|
22
|
+
|
|
23
|
+
export module '@theia/plugin' {
|
|
24
|
+
|
|
25
|
+
// https://github.com/microsoft/vscode/issues/157734
|
|
26
|
+
|
|
27
|
+
export namespace workspace {
|
|
28
|
+
/**
|
|
29
|
+
* An event that is emitted when an edit session identity is about to be requested.
|
|
30
|
+
*/
|
|
31
|
+
export const onWillCreateEditSessionIdentity: Event<EditSessionIdentityWillCreateEvent>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param scheme The URI scheme that this provider can provide edit session identities for.
|
|
36
|
+
* @param provider A provider which can convert URIs for workspace folders of scheme @param scheme to
|
|
37
|
+
* an edit session identifier which is stable across machines. This enables edit sessions to be resolved.
|
|
38
|
+
*/
|
|
39
|
+
export function registerEditSessionIdentityProvider(scheme: string, provider: EditSessionIdentityProvider): Disposable;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface EditSessionIdentityProvider {
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @param workspaceFolder The workspace folder to provide an edit session identity for.
|
|
46
|
+
* @param token A cancellation token for the request.
|
|
47
|
+
* @returns A string representing the edit session identity for the requested workspace folder.
|
|
48
|
+
*/
|
|
49
|
+
provideEditSessionIdentity(workspaceFolder: WorkspaceFolder, token: CancellationToken): ProviderResult<string>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @param identity1 An edit session identity.
|
|
54
|
+
* @param identity2 A second edit session identity to compare to @param identity1.
|
|
55
|
+
* @param token A cancellation token for the request.
|
|
56
|
+
* @returns An {@link EditSessionIdentityMatch} representing the edit session identity match confidence for the provided identities.
|
|
57
|
+
*/
|
|
58
|
+
provideEditSessionIdentityMatch(identity1: string, identity2: string, token: CancellationToken): ProviderResult<EditSessionIdentityMatch>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export enum EditSessionIdentityMatch {
|
|
62
|
+
Complete = 100,
|
|
63
|
+
Partial = 50,
|
|
64
|
+
None = 0
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface EditSessionIdentityWillCreateEvent {
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* A cancellation token.
|
|
71
|
+
*/
|
|
72
|
+
readonly token: CancellationToken;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The workspace folder to create an edit session identity for.
|
|
76
|
+
*/
|
|
77
|
+
readonly workspaceFolder: WorkspaceFolder;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Allows to pause the event until the provided thenable resolves.
|
|
81
|
+
*
|
|
82
|
+
* *Note:* This function can only be called during event dispatch.
|
|
83
|
+
*
|
|
84
|
+
* @param thenable A thenable that delays saving.
|
|
85
|
+
*/
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
87
|
+
waitUntil(thenable: Thenable<any>): void;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2023 Ericsson and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
/*---------------------------------------------------------------------------------------------
|
|
18
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
-
*--------------------------------------------------------------------------------------------*/
|
|
21
|
-
// code copied and modified from https://github.com/microsoft/vscode/blob/1.77.0/src/vscode-dts/vscode.proposed.extensionsAny.d.ts
|
|
22
|
-
|
|
23
|
-
export module '@theia/plugin' {
|
|
24
|
-
|
|
25
|
-
export interface Extension<T> {
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* `true` when the extension is associated to another extension host.
|
|
29
|
-
*
|
|
30
|
-
* *Note* that an extension from another extension host cannot export
|
|
31
|
-
* API, e.g {@link Extension.exports its exports} are always `undefined`.
|
|
32
|
-
*/
|
|
33
|
-
readonly isFromDifferentExtensionHost: boolean;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export namespace extensions {
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Get an extension by its full identifier in the form of: `publisher.name`.
|
|
40
|
-
*
|
|
41
|
-
* @param extensionId An extension identifier.
|
|
42
|
-
* @param includeDifferentExtensionHosts Include extensions from different extension host
|
|
43
|
-
* @return An extension or `undefined`.
|
|
44
|
-
*/
|
|
45
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
|
-
export function getExtension<T = any>(extensionId: string, includeDifferentExtensionHosts: boolean): Extension<T> | undefined;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* All extensions across all extension hosts.
|
|
50
|
-
*
|
|
51
|
-
* @see {@link Extension.isFromDifferentExtensionHost}
|
|
52
|
-
*/
|
|
53
|
-
export const allAcrossExtensionHosts: readonly Extension<void>[];
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2023 Ericsson and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
/*---------------------------------------------------------------------------------------------
|
|
18
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
+
*--------------------------------------------------------------------------------------------*/
|
|
21
|
+
// code copied and modified from https://github.com/microsoft/vscode/blob/1.77.0/src/vscode-dts/vscode.proposed.extensionsAny.d.ts
|
|
22
|
+
|
|
23
|
+
export module '@theia/plugin' {
|
|
24
|
+
|
|
25
|
+
export interface Extension<T> {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* `true` when the extension is associated to another extension host.
|
|
29
|
+
*
|
|
30
|
+
* *Note* that an extension from another extension host cannot export
|
|
31
|
+
* API, e.g {@link Extension.exports its exports} are always `undefined`.
|
|
32
|
+
*/
|
|
33
|
+
readonly isFromDifferentExtensionHost: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export namespace extensions {
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get an extension by its full identifier in the form of: `publisher.name`.
|
|
40
|
+
*
|
|
41
|
+
* @param extensionId An extension identifier.
|
|
42
|
+
* @param includeDifferentExtensionHosts Include extensions from different extension host
|
|
43
|
+
* @return An extension or `undefined`.
|
|
44
|
+
*/
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
|
+
export function getExtension<T = any>(extensionId: string, includeDifferentExtensionHosts: boolean): Extension<T> | undefined;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* All extensions across all extension hosts.
|
|
50
|
+
*
|
|
51
|
+
* @see {@link Extension.isFromDifferentExtensionHost}
|
|
52
|
+
*/
|
|
53
|
+
export const allAcrossExtensionHosts: readonly Extension<void>[];
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
}
|