@theia/plugin 1.45.1 → 1.46.0-next.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.46.0-next.137+bce99c299",
|
|
4
4
|
"description": "Theia - Plugin API",
|
|
5
5
|
"types": "./src/theia.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"watch": "theiaext watch"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@theia/ext-scripts": "1.
|
|
30
|
+
"@theia/ext-scripts": "1.48.0"
|
|
31
31
|
},
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "bce99c299d7a01573330482ce26563eb6b00a6e9"
|
|
36
36
|
}
|
package/src/theia-extra.d.ts
CHANGED
|
@@ -363,6 +363,26 @@ export module '@theia/plugin' {
|
|
|
363
363
|
color?: ThemeColor;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
export interface TerminalObserver {
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* A regex to match against the latest terminal output.
|
|
370
|
+
*/
|
|
371
|
+
readonly outputMatcherRegex: string;
|
|
372
|
+
/**
|
|
373
|
+
* The maximum number of lines to match the regex against. Maximum is 40 lines.
|
|
374
|
+
*/
|
|
375
|
+
readonly nrOfLinesToMatch: number;
|
|
376
|
+
/**
|
|
377
|
+
* Invoked when the regex matched against the terminal contents.
|
|
378
|
+
* @param groups The matched groups
|
|
379
|
+
*/
|
|
380
|
+
matchOccurred(groups: string[]): void;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export namespace window {
|
|
384
|
+
export function registerTerminalObserver(observer: TerminalObserver): Disposable;
|
|
385
|
+
}
|
|
366
386
|
}
|
|
367
387
|
|
|
368
388
|
/**
|
package/src/theia.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
// This program and the accompanying materials are made available under the
|
|
5
5
|
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.g
|
|
7
7
|
//
|
|
8
8
|
// This Source Code may also be made available under the following Secondary
|
|
9
9
|
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
@@ -35,6 +35,7 @@ import './theia.proposed.notebookKernelSource';
|
|
|
35
35
|
import './theia.proposed.notebookMessaging';
|
|
36
36
|
import './theia.proposed.findTextInFiles';
|
|
37
37
|
import './theia.proposed.fsChunks';
|
|
38
|
+
import './theia.proposed.multiDocumentHighlightProvider';
|
|
38
39
|
import './theia.proposed.profileContentHandlers';
|
|
39
40
|
import './theia.proposed.resolvers';
|
|
40
41
|
import './theia.proposed.scmValidation';
|
|
@@ -681,8 +682,12 @@ export module '@theia/plugin' {
|
|
|
681
682
|
/**
|
|
682
683
|
* Indicates that this markdown string is from a trusted source. Only *trusted*
|
|
683
684
|
* markdown supports links that execute commands, e.g. `[Run it](command:myCommandId)`.
|
|
685
|
+
*
|
|
686
|
+
* Defaults to `false` (commands are disabled).
|
|
687
|
+
*
|
|
688
|
+
* If this is an object, only the set of commands listed in `enabledCommands` are allowed.
|
|
684
689
|
*/
|
|
685
|
-
isTrusted?: boolean;
|
|
690
|
+
isTrusted?: boolean | { readonly enabledCommands: readonly string[] };
|
|
686
691
|
|
|
687
692
|
/**
|
|
688
693
|
* Indicates that this markdown string can contain {@link ThemeIcon ThemeIcons}, e.g. `$(zap)`.
|
|
@@ -1892,7 +1897,11 @@ export module '@theia/plugin' {
|
|
|
1892
1897
|
/**
|
|
1893
1898
|
* Render the line numbers with values relative to the primary cursor location.
|
|
1894
1899
|
*/
|
|
1895
|
-
Relative = 2
|
|
1900
|
+
Relative = 2,
|
|
1901
|
+
/**
|
|
1902
|
+
* Render the line numbers on every 10th line number.
|
|
1903
|
+
*/
|
|
1904
|
+
Interval = 3
|
|
1896
1905
|
}
|
|
1897
1906
|
|
|
1898
1907
|
/**
|
|
@@ -3042,10 +3051,11 @@ export module '@theia/plugin' {
|
|
|
3042
3051
|
|
|
3043
3052
|
/**
|
|
3044
3053
|
* Send text to the terminal.
|
|
3045
|
-
* @param text - text
|
|
3046
|
-
* @param
|
|
3054
|
+
* @param text - The text to send.
|
|
3055
|
+
* @param shouldExecute - Indicates that the text being sent should be executed rather than just inserted in the terminal.
|
|
3056
|
+
* The character added is \r, independent from the platform (compared to platform specific in vscode). This defaults to `true`.
|
|
3047
3057
|
*/
|
|
3048
|
-
sendText(text: string,
|
|
3058
|
+
sendText(text: string, shouldExecute?: boolean): void;
|
|
3049
3059
|
|
|
3050
3060
|
/**
|
|
3051
3061
|
* Show created terminal on the UI.
|
|
@@ -7526,6 +7536,29 @@ export module '@theia/plugin' {
|
|
|
7526
7536
|
*/
|
|
7527
7537
|
export function findFiles(include: GlobPattern, exclude?: GlobPattern | null, maxResults?: number, token?: CancellationToken): Thenable<Uri[]>;
|
|
7528
7538
|
|
|
7539
|
+
/**
|
|
7540
|
+
* Saves the editor identified by the given resource and returns the resulting resource or `undefined`
|
|
7541
|
+
* if save was not successful or no editor with the given resource was found.
|
|
7542
|
+
*
|
|
7543
|
+
* **Note** that an editor with the provided resource must be opened in order to be saved.
|
|
7544
|
+
*
|
|
7545
|
+
* @param uri the associated uri for the opened editor to save.
|
|
7546
|
+
* @returns A thenable that resolves when the save operation has finished.
|
|
7547
|
+
*/
|
|
7548
|
+
export function save(uri: Uri): Thenable<Uri | undefined>;
|
|
7549
|
+
|
|
7550
|
+
/**
|
|
7551
|
+
* Saves the editor identified by the given resource to a new file name as provided by the user and
|
|
7552
|
+
* returns the resulting resource or `undefined` if save was not successful or cancelled or no editor
|
|
7553
|
+
* with the given resource was found.
|
|
7554
|
+
*
|
|
7555
|
+
* **Note** that an editor with the provided resource must be opened in order to be saved as.
|
|
7556
|
+
*
|
|
7557
|
+
* @param uri the associated uri for the opened editor to save as.
|
|
7558
|
+
* @returns A thenable that resolves when the save-as operation has finished.
|
|
7559
|
+
*/
|
|
7560
|
+
export function saveAs(uri: Uri): Thenable<Uri | undefined>;
|
|
7561
|
+
|
|
7529
7562
|
/**
|
|
7530
7563
|
* Save all dirty files.
|
|
7531
7564
|
*
|
|
@@ -7564,7 +7597,7 @@ export module '@theia/plugin' {
|
|
|
7564
7597
|
* @param options Immutable metadata about the provider.
|
|
7565
7598
|
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
7566
7599
|
*/
|
|
7567
|
-
export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean, readonly isReadonly?: boolean }): Disposable;
|
|
7600
|
+
export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean, readonly isReadonly?: boolean | MarkdownString }): Disposable;
|
|
7568
7601
|
|
|
7569
7602
|
/**
|
|
7570
7603
|
* Returns the {@link WorkspaceFolder workspace folder} that contains a given uri.
|
|
@@ -10252,15 +10285,7 @@ export module '@theia/plugin' {
|
|
|
10252
10285
|
* @param uri A resource identifier.
|
|
10253
10286
|
* @param edits An array of edits.
|
|
10254
10287
|
*/
|
|
10255
|
-
set(uri: Uri, edits: ReadonlyArray<[TextEdit | SnippetTextEdit, WorkspaceEditEntryMetadata]>): void;
|
|
10256
|
-
|
|
10257
|
-
/**
|
|
10258
|
-
* Set (and replace) text edits or snippet edits with metadata for a resource.
|
|
10259
|
-
*
|
|
10260
|
-
* @param uri A resource identifier.
|
|
10261
|
-
* @param edits An array of edits.
|
|
10262
|
-
*/
|
|
10263
|
-
set(uri: Uri, edits: ReadonlyArray<[TextEdit | SnippetTextEdit, WorkspaceEditEntryMetadata]>): void;
|
|
10288
|
+
set(uri: Uri, edits: ReadonlyArray<[TextEdit | SnippetTextEdit, WorkspaceEditEntryMetadata | undefined]>): void;
|
|
10264
10289
|
|
|
10265
10290
|
/**
|
|
10266
10291
|
* Set (and replace) notebook edits for a resource.
|
|
@@ -10276,7 +10301,7 @@ export module '@theia/plugin' {
|
|
|
10276
10301
|
* @param uri A resource identifier.
|
|
10277
10302
|
* @param edits An array of edits.
|
|
10278
10303
|
*/
|
|
10279
|
-
set(uri: Uri, edits: ReadonlyArray<[NotebookEdit, WorkspaceEditEntryMetadata]>): void;
|
|
10304
|
+
set(uri: Uri, edits: ReadonlyArray<[NotebookEdit, WorkspaceEditEntryMetadata | undefined]>): void;
|
|
10280
10305
|
|
|
10281
10306
|
/**
|
|
10282
10307
|
* Get the text edits for a resource.
|
|
@@ -15958,9 +15983,18 @@ export module '@theia/plugin' {
|
|
|
15958
15983
|
* the generic "run all" button, then the default profile for
|
|
15959
15984
|
* {@link TestRunProfileKind.Run} will be executed, although the
|
|
15960
15985
|
* user can configure this.
|
|
15986
|
+
*
|
|
15987
|
+
* Changes the user makes in their default profiles will be reflected
|
|
15988
|
+
* in this property after a {@link onDidChangeDefault} event.
|
|
15961
15989
|
*/
|
|
15962
15990
|
isDefault: boolean;
|
|
15963
15991
|
|
|
15992
|
+
/**
|
|
15993
|
+
* Fired when a user has changed whether this is a default profile. The
|
|
15994
|
+
* event contains the new value of {@link isDefault}
|
|
15995
|
+
*/
|
|
15996
|
+
onDidChangeDefault: Event<boolean>;
|
|
15997
|
+
|
|
15964
15998
|
/**
|
|
15965
15999
|
* Whether this profile supports continuous running of requests. If so,
|
|
15966
16000
|
* then {@link TestRunRequest.continuous} may be set to `true`. Defaults
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -40,7 +40,7 @@ export module '@theia/plugin' {
|
|
|
40
40
|
* @return Terminal quick fix(es) if any
|
|
41
41
|
*/
|
|
42
42
|
provideTerminalQuickFixes(commandMatchResult: TerminalCommandMatchResult, token: CancellationToken):
|
|
43
|
-
ProviderResult<SingleOrMany<
|
|
43
|
+
ProviderResult<SingleOrMany<TerminalQuickFixTerminalCommand | TerminalQuickFixOpener | Command>>;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export interface TerminalCommandMatchResult {
|
|
@@ -52,12 +52,16 @@ export module '@theia/plugin' {
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export class
|
|
55
|
+
export class TerminalQuickFixTerminalCommand {
|
|
56
56
|
/**
|
|
57
|
-
* The terminal command to run
|
|
57
|
+
* The terminal command to insert or run
|
|
58
58
|
*/
|
|
59
59
|
terminalCommand: string;
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Whether the command should be executed or just inserted (default)
|
|
62
|
+
*/
|
|
63
|
+
shouldExecute?: boolean;
|
|
64
|
+
constructor(terminalCommand: string, shouldExecute?: boolean);
|
|
61
65
|
}
|
|
62
66
|
export class TerminalQuickFixOpener {
|
|
63
67
|
/**
|