@theia/plugin 1.47.1 → 1.48.1
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 -383
- package/src/theia.d.ts +16546 -16542
- 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,178 +1,178 @@
|
|
|
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.findTextInFiles.d.ts
|
|
22
|
-
|
|
23
|
-
export module '@theia/plugin' {
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Options that can be set on a findTextInFiles search.
|
|
27
|
-
*/
|
|
28
|
-
export interface FindTextInFilesOptions {
|
|
29
|
-
/**
|
|
30
|
-
* A [glob pattern](#GlobPattern) that defines the files to search for. The glob pattern
|
|
31
|
-
* will be matched against the file paths of files relative to their workspace. Use a [relative pattern](#RelativePattern)
|
|
32
|
-
* to restrict the search results to a [workspace folder](#WorkspaceFolder).
|
|
33
|
-
*/
|
|
34
|
-
include?: GlobPattern;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* A [glob pattern](#GlobPattern) that defines files and folders to exclude. The glob pattern
|
|
38
|
-
* will be matched against the file paths of resulting matches relative to their workspace. When `undefined`, default excludes will
|
|
39
|
-
* apply.
|
|
40
|
-
*/
|
|
41
|
-
exclude?: GlobPattern;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Whether to use the default and user-configured excludes. Defaults to true.
|
|
45
|
-
*/
|
|
46
|
-
useDefaultExcludes?: boolean;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* The maximum number of results to search for
|
|
50
|
-
*/
|
|
51
|
-
maxResults?: number;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Whether external files that exclude files, like .gitignore, should be respected.
|
|
55
|
-
* See the vscode setting `"search.useIgnoreFiles"`.
|
|
56
|
-
*/
|
|
57
|
-
useIgnoreFiles?: boolean;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Whether global files that exclude files, like .gitignore, should be respected.
|
|
61
|
-
* See the vscode setting `"search.useGlobalIgnoreFiles"`.
|
|
62
|
-
*/
|
|
63
|
-
useGlobalIgnoreFiles?: boolean;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Whether symlinks should be followed while searching.
|
|
67
|
-
* See the vscode setting `"search.followSymlinks"`.
|
|
68
|
-
*/
|
|
69
|
-
followSymlinks?: boolean;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Interpret files using this encoding.
|
|
73
|
-
* See the vscode setting `"files.encoding"`
|
|
74
|
-
*/
|
|
75
|
-
encoding?: string;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Options to specify the size of the result text preview.
|
|
79
|
-
*/
|
|
80
|
-
previewOptions?: TextSearchPreviewOptions;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Number of lines of context to include before each match.
|
|
84
|
-
*/
|
|
85
|
-
beforeContext?: number;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Number of lines of context to include after each match.
|
|
89
|
-
*/
|
|
90
|
-
afterContext?: number;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* A match from a text search
|
|
95
|
-
*/
|
|
96
|
-
export interface TextSearchMatch {
|
|
97
|
-
/**
|
|
98
|
-
* The uri for the matching document.
|
|
99
|
-
*/
|
|
100
|
-
uri: Uri;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* The range of the match within the document, or multiple ranges for multiple matches.
|
|
104
|
-
*/
|
|
105
|
-
ranges: Range | Range[];
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* A preview of the text match.
|
|
109
|
-
*/
|
|
110
|
-
preview: TextSearchMatchPreview;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* A preview of the text result.
|
|
115
|
-
*/
|
|
116
|
-
export interface TextSearchMatchPreview {
|
|
117
|
-
/**
|
|
118
|
-
* The matching lines of text, or a portion of the matching line that contains the match.
|
|
119
|
-
*/
|
|
120
|
-
text: string;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* The Range within `text` corresponding to the text of the match.
|
|
124
|
-
* The number of matches must match the TextSearchMatch's range property.
|
|
125
|
-
*/
|
|
126
|
-
matches: Range | Range[];
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* A line of context surrounding a TextSearchMatch.
|
|
131
|
-
*/
|
|
132
|
-
export interface TextSearchContext {
|
|
133
|
-
/**
|
|
134
|
-
* The uri for the matching document.
|
|
135
|
-
*/
|
|
136
|
-
uri: Uri;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* One line of text.
|
|
140
|
-
* previewOptions.charsPerLine applies to this
|
|
141
|
-
*/
|
|
142
|
-
text: string;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* The line number of this line of context.
|
|
146
|
-
*/
|
|
147
|
-
lineNumber: number;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export type TextSearchResult = TextSearchMatch | TextSearchContext;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Information collected when text search is complete.
|
|
154
|
-
*/
|
|
155
|
-
export interface TextSearchComplete {
|
|
156
|
-
/**
|
|
157
|
-
* Whether the search hit the limit on the maximum number of search results.
|
|
158
|
-
* `maxResults` on [`TextSearchOptions`](#TextSearchOptions) specifies the max number of results.
|
|
159
|
-
* - If exactly that number of matches exist, this should be false.
|
|
160
|
-
* - If `maxResults` matches are returned and more exist, this should be true.
|
|
161
|
-
* - If search hits an internal limit which is less than `maxResults`, this should be true.
|
|
162
|
-
*/
|
|
163
|
-
limitHit?: boolean;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export namespace workspace {
|
|
167
|
-
/**
|
|
168
|
-
* Find text in files across all [workspace folders] in the workspace
|
|
169
|
-
* @param query What to search
|
|
170
|
-
* @param optionsOrCallback
|
|
171
|
-
* @param callbackOrToken
|
|
172
|
-
* @param token
|
|
173
|
-
*/
|
|
174
|
-
export function findTextInFiles(query: TextSearchQuery, optionsOrCallback: FindTextInFilesOptions | ((result: TextSearchResult) => void),
|
|
175
|
-
callbackOrToken?: CancellationToken | ((result: TextSearchResult) => void), token?: CancellationToken): Promise<TextSearchComplete>;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
}
|
|
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.findTextInFiles.d.ts
|
|
22
|
+
|
|
23
|
+
export module '@theia/plugin' {
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Options that can be set on a findTextInFiles search.
|
|
27
|
+
*/
|
|
28
|
+
export interface FindTextInFilesOptions {
|
|
29
|
+
/**
|
|
30
|
+
* A [glob pattern](#GlobPattern) that defines the files to search for. The glob pattern
|
|
31
|
+
* will be matched against the file paths of files relative to their workspace. Use a [relative pattern](#RelativePattern)
|
|
32
|
+
* to restrict the search results to a [workspace folder](#WorkspaceFolder).
|
|
33
|
+
*/
|
|
34
|
+
include?: GlobPattern;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* A [glob pattern](#GlobPattern) that defines files and folders to exclude. The glob pattern
|
|
38
|
+
* will be matched against the file paths of resulting matches relative to their workspace. When `undefined`, default excludes will
|
|
39
|
+
* apply.
|
|
40
|
+
*/
|
|
41
|
+
exclude?: GlobPattern;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Whether to use the default and user-configured excludes. Defaults to true.
|
|
45
|
+
*/
|
|
46
|
+
useDefaultExcludes?: boolean;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The maximum number of results to search for
|
|
50
|
+
*/
|
|
51
|
+
maxResults?: number;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Whether external files that exclude files, like .gitignore, should be respected.
|
|
55
|
+
* See the vscode setting `"search.useIgnoreFiles"`.
|
|
56
|
+
*/
|
|
57
|
+
useIgnoreFiles?: boolean;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Whether global files that exclude files, like .gitignore, should be respected.
|
|
61
|
+
* See the vscode setting `"search.useGlobalIgnoreFiles"`.
|
|
62
|
+
*/
|
|
63
|
+
useGlobalIgnoreFiles?: boolean;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Whether symlinks should be followed while searching.
|
|
67
|
+
* See the vscode setting `"search.followSymlinks"`.
|
|
68
|
+
*/
|
|
69
|
+
followSymlinks?: boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Interpret files using this encoding.
|
|
73
|
+
* See the vscode setting `"files.encoding"`
|
|
74
|
+
*/
|
|
75
|
+
encoding?: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Options to specify the size of the result text preview.
|
|
79
|
+
*/
|
|
80
|
+
previewOptions?: TextSearchPreviewOptions;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Number of lines of context to include before each match.
|
|
84
|
+
*/
|
|
85
|
+
beforeContext?: number;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Number of lines of context to include after each match.
|
|
89
|
+
*/
|
|
90
|
+
afterContext?: number;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* A match from a text search
|
|
95
|
+
*/
|
|
96
|
+
export interface TextSearchMatch {
|
|
97
|
+
/**
|
|
98
|
+
* The uri for the matching document.
|
|
99
|
+
*/
|
|
100
|
+
uri: Uri;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The range of the match within the document, or multiple ranges for multiple matches.
|
|
104
|
+
*/
|
|
105
|
+
ranges: Range | Range[];
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* A preview of the text match.
|
|
109
|
+
*/
|
|
110
|
+
preview: TextSearchMatchPreview;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A preview of the text result.
|
|
115
|
+
*/
|
|
116
|
+
export interface TextSearchMatchPreview {
|
|
117
|
+
/**
|
|
118
|
+
* The matching lines of text, or a portion of the matching line that contains the match.
|
|
119
|
+
*/
|
|
120
|
+
text: string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The Range within `text` corresponding to the text of the match.
|
|
124
|
+
* The number of matches must match the TextSearchMatch's range property.
|
|
125
|
+
*/
|
|
126
|
+
matches: Range | Range[];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* A line of context surrounding a TextSearchMatch.
|
|
131
|
+
*/
|
|
132
|
+
export interface TextSearchContext {
|
|
133
|
+
/**
|
|
134
|
+
* The uri for the matching document.
|
|
135
|
+
*/
|
|
136
|
+
uri: Uri;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* One line of text.
|
|
140
|
+
* previewOptions.charsPerLine applies to this
|
|
141
|
+
*/
|
|
142
|
+
text: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The line number of this line of context.
|
|
146
|
+
*/
|
|
147
|
+
lineNumber: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export type TextSearchResult = TextSearchMatch | TextSearchContext;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Information collected when text search is complete.
|
|
154
|
+
*/
|
|
155
|
+
export interface TextSearchComplete {
|
|
156
|
+
/**
|
|
157
|
+
* Whether the search hit the limit on the maximum number of search results.
|
|
158
|
+
* `maxResults` on [`TextSearchOptions`](#TextSearchOptions) specifies the max number of results.
|
|
159
|
+
* - If exactly that number of matches exist, this should be false.
|
|
160
|
+
* - If `maxResults` matches are returned and more exist, this should be true.
|
|
161
|
+
* - If search hits an internal limit which is less than `maxResults`, this should be true.
|
|
162
|
+
*/
|
|
163
|
+
limitHit?: boolean;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export namespace workspace {
|
|
167
|
+
/**
|
|
168
|
+
* Find text in files across all [workspace folders] in the workspace
|
|
169
|
+
* @param query What to search
|
|
170
|
+
* @param optionsOrCallback
|
|
171
|
+
* @param callbackOrToken
|
|
172
|
+
* @param token
|
|
173
|
+
*/
|
|
174
|
+
export function findTextInFiles(query: TextSearchQuery, optionsOrCallback: FindTextInFilesOptions | ((result: TextSearchResult) => void),
|
|
175
|
+
callbackOrToken?: CancellationToken | ((result: TextSearchResult) => void), token?: CancellationToken): Promise<TextSearchComplete>;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
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.fsChunks.d.ts
|
|
22
|
-
|
|
23
|
-
export module '@theia/plugin' {
|
|
24
|
-
|
|
25
|
-
export interface FileSystemProvider {
|
|
26
|
-
open?(resource: Uri, options: { create: boolean }): number | Thenable<number>;
|
|
27
|
-
close?(fd: number): void | Thenable<void>;
|
|
28
|
-
read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
|
|
29
|
-
write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}
|
|
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.fsChunks.d.ts
|
|
22
|
+
|
|
23
|
+
export module '@theia/plugin' {
|
|
24
|
+
|
|
25
|
+
export interface FileSystemProvider {
|
|
26
|
+
open?(resource: Uri, options: { create: boolean }): number | Thenable<number>;
|
|
27
|
+
close?(fd: number): void | Thenable<void>;
|
|
28
|
+
read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
|
|
29
|
+
write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2023 STMicroelectronics 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.85.1/src/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts
|
|
22
|
-
|
|
23
|
-
declare module '@theia/plugin' {
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Represents a collection of document highlights from multiple documents.
|
|
27
|
-
*/
|
|
28
|
-
export class MultiDocumentHighlight {
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* The URI of the document containing the highlights.
|
|
32
|
-
*/
|
|
33
|
-
uri: Uri;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* The highlights for the document.
|
|
37
|
-
*/
|
|
38
|
-
highlights: DocumentHighlight[];
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Creates a new instance of MultiDocumentHighlight.
|
|
42
|
-
* @param uri The URI of the document containing the highlights.
|
|
43
|
-
* @param highlights The highlights for the document.
|
|
44
|
-
*/
|
|
45
|
-
constructor(uri: Uri, highlights: DocumentHighlight[]);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface MultiDocumentHighlightProvider {
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Provide a set of document highlights, like all occurrences of a variable or
|
|
52
|
-
* all exit-points of a function.
|
|
53
|
-
*
|
|
54
|
-
* @param document The document in which the command was invoked.
|
|
55
|
-
* @param position The position at which the command was invoked.
|
|
56
|
-
* @param otherDocuments An array of additional valid documents for which highlights should be provided.
|
|
57
|
-
* @param token A cancellation token.
|
|
58
|
-
* @returns A Map containing a mapping of the Uri of a document to the document highlights or a thenable that resolves to such. The lack of a result can be
|
|
59
|
-
* signaled by returning `undefined`, `null`, or an empty map.
|
|
60
|
-
*/
|
|
61
|
-
provideMultiDocumentHighlights(document: TextDocument, position: Position, otherDocuments: TextDocument[], token: CancellationToken):
|
|
62
|
-
ProviderResult<MultiDocumentHighlight[]>;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
namespace languages {
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Register a multi document highlight provider.
|
|
69
|
-
*
|
|
70
|
-
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
71
|
-
* by their {@link languages.match score} and groups sequentially asked for document highlights.
|
|
72
|
-
* The process stops when a provider returns a `non-falsy` or `non-failure` result.
|
|
73
|
-
*
|
|
74
|
-
* @param selector A selector that defines the documents this provider is applicable to.
|
|
75
|
-
* @param provider A multi-document highlight provider.
|
|
76
|
-
* @returns A {@link Disposable} that unregisters this provider when being disposed.
|
|
77
|
-
* @stubbed
|
|
78
|
-
*/
|
|
79
|
-
export function registerMultiDocumentHighlightProvider(selector: DocumentSelector, provider: MultiDocumentHighlightProvider): Disposable;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2023 STMicroelectronics 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.85.1/src/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts
|
|
22
|
+
|
|
23
|
+
declare module '@theia/plugin' {
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Represents a collection of document highlights from multiple documents.
|
|
27
|
+
*/
|
|
28
|
+
export class MultiDocumentHighlight {
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The URI of the document containing the highlights.
|
|
32
|
+
*/
|
|
33
|
+
uri: Uri;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The highlights for the document.
|
|
37
|
+
*/
|
|
38
|
+
highlights: DocumentHighlight[];
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new instance of MultiDocumentHighlight.
|
|
42
|
+
* @param uri The URI of the document containing the highlights.
|
|
43
|
+
* @param highlights The highlights for the document.
|
|
44
|
+
*/
|
|
45
|
+
constructor(uri: Uri, highlights: DocumentHighlight[]);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface MultiDocumentHighlightProvider {
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Provide a set of document highlights, like all occurrences of a variable or
|
|
52
|
+
* all exit-points of a function.
|
|
53
|
+
*
|
|
54
|
+
* @param document The document in which the command was invoked.
|
|
55
|
+
* @param position The position at which the command was invoked.
|
|
56
|
+
* @param otherDocuments An array of additional valid documents for which highlights should be provided.
|
|
57
|
+
* @param token A cancellation token.
|
|
58
|
+
* @returns A Map containing a mapping of the Uri of a document to the document highlights or a thenable that resolves to such. The lack of a result can be
|
|
59
|
+
* signaled by returning `undefined`, `null`, or an empty map.
|
|
60
|
+
*/
|
|
61
|
+
provideMultiDocumentHighlights(document: TextDocument, position: Position, otherDocuments: TextDocument[], token: CancellationToken):
|
|
62
|
+
ProviderResult<MultiDocumentHighlight[]>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
namespace languages {
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Register a multi document highlight provider.
|
|
69
|
+
*
|
|
70
|
+
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
71
|
+
* by their {@link languages.match score} and groups sequentially asked for document highlights.
|
|
72
|
+
* The process stops when a provider returns a `non-falsy` or `non-failure` result.
|
|
73
|
+
*
|
|
74
|
+
* @param selector A selector that defines the documents this provider is applicable to.
|
|
75
|
+
* @param provider A multi-document highlight provider.
|
|
76
|
+
* @returns A {@link Disposable} that unregisters this provider when being disposed.
|
|
77
|
+
* @stubbed
|
|
78
|
+
*/
|
|
79
|
+
export function registerMultiDocumentHighlightProvider(selector: DocumentSelector, provider: MultiDocumentHighlightProvider): Disposable;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
}
|