@theia/plugin 1.26.0-next.4 → 1.26.0-next.41
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 +2 -2
- package/src/theia.d.ts +243 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.26.0-next.
|
|
3
|
+
"version": "1.26.0-next.41+f94732ef523",
|
|
4
4
|
"description": "Theia - Plugin API",
|
|
5
5
|
"types": "./src/theia.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "f94732ef5237233e30d3f07ce47c698ca59449f9"
|
|
36
36
|
}
|
package/src/theia.d.ts
CHANGED
|
@@ -530,6 +530,14 @@ export module '@theia/plugin' {
|
|
|
530
530
|
Command = 3
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
+
export enum TextDocumentChangeReason {
|
|
534
|
+
/** The text change is caused by an undo operation. */
|
|
535
|
+
Undo = 1,
|
|
536
|
+
|
|
537
|
+
/** The text change is caused by a redo operation. */
|
|
538
|
+
Redo = 2,
|
|
539
|
+
}
|
|
540
|
+
|
|
533
541
|
/**
|
|
534
542
|
* Represents an event describing the change in text editor selections.
|
|
535
543
|
*/
|
|
@@ -734,12 +742,51 @@ export module '@theia/plugin' {
|
|
|
734
742
|
*/
|
|
735
743
|
isTrusted?: boolean;
|
|
736
744
|
|
|
745
|
+
/**
|
|
746
|
+
* Indicates that this markdown string can contain {@link ThemeIcon ThemeIcons}, e.g. `$(zap)`.
|
|
747
|
+
*/
|
|
748
|
+
supportThemeIcons?: boolean;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Indicates that this markdown string can contain raw html tags. Defaults to `false`.
|
|
752
|
+
*
|
|
753
|
+
* When `supportHtml` is false, the markdown renderer will strip out any raw html tags
|
|
754
|
+
* that appear in the markdown text. This means you can only use markdown syntax for rendering.
|
|
755
|
+
*
|
|
756
|
+
* When `supportHtml` is true, the markdown render will also allow a safe subset of html tags
|
|
757
|
+
* and attributes to be rendered. See https://github.com/microsoft/vscode/blob/6d2920473c6f13759c978dd89104c4270a83422d/src/vs/base/browser/markdownRenderer.ts#L296
|
|
758
|
+
* for a list of all supported tags and attributes.
|
|
759
|
+
*/
|
|
760
|
+
supportHtml?: boolean;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* Uri that relative paths are resolved relative to.
|
|
764
|
+
*
|
|
765
|
+
* If the `baseUri` ends with `/`, it is considered a directory and relative paths in the markdown are resolved relative to that directory:
|
|
766
|
+
*
|
|
767
|
+
* ```ts
|
|
768
|
+
* const md = new vscode.MarkdownString(`[link](./file.js)`);
|
|
769
|
+
* md.baseUri = vscode.Uri.file('/path/to/dir/');
|
|
770
|
+
* // Here 'link' in the rendered markdown resolves to '/path/to/dir/file.js'
|
|
771
|
+
* ```
|
|
772
|
+
*
|
|
773
|
+
* If the `baseUri` is a file, relative paths in the markdown are resolved relative to the parent dir of that file:
|
|
774
|
+
*
|
|
775
|
+
* ```ts
|
|
776
|
+
* const md = new vscode.MarkdownString(`[link](./file.js)`);
|
|
777
|
+
* md.baseUri = vscode.Uri.file('/path/to/otherFile.js');
|
|
778
|
+
* // Here 'link' in the rendered markdown resolves to '/path/to/file.js'
|
|
779
|
+
* ```
|
|
780
|
+
*/
|
|
781
|
+
baseUri?: Uri;
|
|
782
|
+
|
|
737
783
|
/**
|
|
738
784
|
* Creates a new markdown string with the given value.
|
|
739
785
|
*
|
|
740
786
|
* @param value Optional, initial value.
|
|
787
|
+
* @param supportThemeIcons Optional, Specifies whether {@link ThemeIcon ThemeIcons} are supported within the {@linkcode MarkdownString}.
|
|
741
788
|
*/
|
|
742
|
-
constructor(value?: string);
|
|
789
|
+
constructor(value?: string, supportThemeIcons?: boolean);
|
|
743
790
|
|
|
744
791
|
/**
|
|
745
792
|
* Appends and escapes the given string to this markdown string.
|
|
@@ -1788,10 +1835,26 @@ export module '@theia/plugin' {
|
|
|
1788
1835
|
readonly files: ReadonlyArray<{ oldUri: Uri, newUri: Uri }>;
|
|
1789
1836
|
}
|
|
1790
1837
|
|
|
1838
|
+
/**
|
|
1839
|
+
* An event describing a transactional {@link TextDocument document} change.
|
|
1840
|
+
*/
|
|
1791
1841
|
export interface TextDocumentChangeEvent {
|
|
1792
|
-
document: TextDocument;
|
|
1793
1842
|
|
|
1794
|
-
|
|
1843
|
+
/**
|
|
1844
|
+
* The affected document.
|
|
1845
|
+
*/
|
|
1846
|
+
readonly document: TextDocument;
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* An array of content changes.
|
|
1850
|
+
*/
|
|
1851
|
+
readonly contentChanges: readonly TextDocumentContentChangeEvent[];
|
|
1852
|
+
|
|
1853
|
+
/**
|
|
1854
|
+
* The reason why the document was changed.
|
|
1855
|
+
* Is `undefined` if the reason is not known.
|
|
1856
|
+
*/
|
|
1857
|
+
readonly reason: TextDocumentChangeReason | undefined;
|
|
1795
1858
|
}
|
|
1796
1859
|
|
|
1797
1860
|
export interface TextDocumentContentChangeEvent {
|
|
@@ -2122,7 +2185,7 @@ export module '@theia/plugin' {
|
|
|
2122
2185
|
}
|
|
2123
2186
|
|
|
2124
2187
|
/**
|
|
2125
|
-
* The type of a {@link QuickPickItem
|
|
2188
|
+
* The type of a {@link QuickPickItem quick pick item}. If `Separator` is set, all fields other than {@link QuickPickItem.label label} will be ignored.
|
|
2126
2189
|
*/
|
|
2127
2190
|
export enum QuickPickItemKind {
|
|
2128
2191
|
Separator = -1,
|
|
@@ -2516,7 +2579,7 @@ export module '@theia/plugin' {
|
|
|
2516
2579
|
/**
|
|
2517
2580
|
* The tooltip text when you hover over this entry.
|
|
2518
2581
|
*/
|
|
2519
|
-
tooltip: string | undefined;
|
|
2582
|
+
tooltip: string | MarkdownString | undefined;
|
|
2520
2583
|
|
|
2521
2584
|
/**
|
|
2522
2585
|
* The foreground color for this entry.
|
|
@@ -2770,6 +2833,21 @@ export module '@theia/plugin' {
|
|
|
2770
2833
|
*/
|
|
2771
2834
|
readonly processId: PromiseLike<number>;
|
|
2772
2835
|
|
|
2836
|
+
/**
|
|
2837
|
+
* The exit status of the terminal, this will be undefined while the terminal is active.
|
|
2838
|
+
*
|
|
2839
|
+
* **Example:** Show a notification with the exit code when the terminal exits with a
|
|
2840
|
+
* non-zero exit code.
|
|
2841
|
+
* ```typescript
|
|
2842
|
+
* window.onDidCloseTerminal(t => {
|
|
2843
|
+
* if (t.exitStatus && t.exitStatus.code) {
|
|
2844
|
+
* vscode.window.showInformationMessage(`Exit code: ${t.exitStatus.code}`);
|
|
2845
|
+
* }
|
|
2846
|
+
* });
|
|
2847
|
+
* ```
|
|
2848
|
+
*/
|
|
2849
|
+
readonly exitStatus: TerminalExitStatus | undefined;
|
|
2850
|
+
|
|
2773
2851
|
/**
|
|
2774
2852
|
* Send text to the terminal.
|
|
2775
2853
|
* @param text - text content.
|
|
@@ -2844,6 +2922,20 @@ export module '@theia/plugin' {
|
|
|
2844
2922
|
readonly rows: number;
|
|
2845
2923
|
}
|
|
2846
2924
|
|
|
2925
|
+
/**
|
|
2926
|
+
* Represents how a terminal exited.
|
|
2927
|
+
*/
|
|
2928
|
+
export interface TerminalExitStatus {
|
|
2929
|
+
/**
|
|
2930
|
+
* The exit code that a terminal exited with, it can have the following values:
|
|
2931
|
+
* - Zero: the terminal process or custom execution succeeded.
|
|
2932
|
+
* - Non-zero: the terminal process or custom execution failed.
|
|
2933
|
+
* - `undefined`: the user forcibly closed the terminal or a custom execution exited
|
|
2934
|
+
* without providing an exit code.
|
|
2935
|
+
*/
|
|
2936
|
+
readonly code: number | undefined;
|
|
2937
|
+
}
|
|
2938
|
+
|
|
2847
2939
|
/**
|
|
2848
2940
|
* Options a virtual process terminal.
|
|
2849
2941
|
* @deprecated since 1.23.0 - Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead.
|
|
@@ -7919,6 +8011,82 @@ export module '@theia/plugin' {
|
|
|
7919
8011
|
dispose(): void;
|
|
7920
8012
|
}
|
|
7921
8013
|
|
|
8014
|
+
/**
|
|
8015
|
+
* Represents the severity of a language status item.
|
|
8016
|
+
*/
|
|
8017
|
+
export enum LanguageStatusSeverity {
|
|
8018
|
+
Information = 0,
|
|
8019
|
+
Warning = 1,
|
|
8020
|
+
Error = 2
|
|
8021
|
+
}
|
|
8022
|
+
|
|
8023
|
+
/**
|
|
8024
|
+
* A language status item is the preferred way to present language status reports for the active text editors,
|
|
8025
|
+
* such as selected linter or notifying about a configuration problem.
|
|
8026
|
+
*/
|
|
8027
|
+
export interface LanguageStatusItem {
|
|
8028
|
+
|
|
8029
|
+
/**
|
|
8030
|
+
* The identifier of this item.
|
|
8031
|
+
*/
|
|
8032
|
+
readonly id: string;
|
|
8033
|
+
|
|
8034
|
+
/**
|
|
8035
|
+
* The short name of this item, like 'Java Language Status', etc.
|
|
8036
|
+
*/
|
|
8037
|
+
name: string | undefined;
|
|
8038
|
+
|
|
8039
|
+
/**
|
|
8040
|
+
* A {@link DocumentSelector selector} that defines for what editors
|
|
8041
|
+
* this item shows.
|
|
8042
|
+
*/
|
|
8043
|
+
selector: DocumentSelector;
|
|
8044
|
+
|
|
8045
|
+
/**
|
|
8046
|
+
* The severity of this item.
|
|
8047
|
+
*
|
|
8048
|
+
* Defaults to {@link LanguageStatusSeverity.Information information}. You can use this property to
|
|
8049
|
+
* signal to users that there is a problem that needs attention, like a missing executable or an
|
|
8050
|
+
* invalid configuration.
|
|
8051
|
+
*/
|
|
8052
|
+
severity: LanguageStatusSeverity;
|
|
8053
|
+
|
|
8054
|
+
/**
|
|
8055
|
+
* The text to show for the entry. You can embed icons in the text by leveraging the syntax:
|
|
8056
|
+
*
|
|
8057
|
+
* `My text $(icon-name) contains icons like $(icon-name) this one.`
|
|
8058
|
+
*
|
|
8059
|
+
* Where the icon-name is taken from the ThemeIcon [icon set](https://code.visualstudio.com/api/references/icons-in-labels#icon-listing), e.g.
|
|
8060
|
+
* `light-bulb`, `thumbsup`, `zap` etc.
|
|
8061
|
+
*/
|
|
8062
|
+
text: string;
|
|
8063
|
+
|
|
8064
|
+
/**
|
|
8065
|
+
* Optional, human-readable details for this item.
|
|
8066
|
+
*/
|
|
8067
|
+
detail?: string;
|
|
8068
|
+
|
|
8069
|
+
/**
|
|
8070
|
+
* Controls whether the item is shown as "busy". Defaults to `false`.
|
|
8071
|
+
*/
|
|
8072
|
+
busy: boolean;
|
|
8073
|
+
|
|
8074
|
+
/**
|
|
8075
|
+
* A {@linkcode Command command} for this item.
|
|
8076
|
+
*/
|
|
8077
|
+
command: Command | undefined;
|
|
8078
|
+
|
|
8079
|
+
/**
|
|
8080
|
+
* Accessibility information used when a screen reader interacts with this item
|
|
8081
|
+
*/
|
|
8082
|
+
accessibilityInformation?: AccessibilityInformation;
|
|
8083
|
+
|
|
8084
|
+
/**
|
|
8085
|
+
* Dispose and free associated resources.
|
|
8086
|
+
*/
|
|
8087
|
+
dispose(): void;
|
|
8088
|
+
}
|
|
8089
|
+
|
|
7922
8090
|
/**
|
|
7923
8091
|
* A code action represents a change that can be performed in code, e.g. to fix a problem or
|
|
7924
8092
|
* to refactor code.
|
|
@@ -9232,6 +9400,27 @@ export module '@theia/plugin' {
|
|
|
9232
9400
|
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
|
|
9233
9401
|
*/
|
|
9234
9402
|
export function registerCallHierarchyProvider(selector: DocumentSelector, provider: CallHierarchyProvider): Disposable;
|
|
9403
|
+
|
|
9404
|
+
/**
|
|
9405
|
+
* Register a linked editing range provider.
|
|
9406
|
+
*
|
|
9407
|
+
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9408
|
+
* by their {@link languages.match score} and the best-matching provider that has a result is used. Failure
|
|
9409
|
+
* of the selected provider will cause a failure of the whole operation.
|
|
9410
|
+
*
|
|
9411
|
+
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9412
|
+
* @param provider A linked editing range provider.
|
|
9413
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
9414
|
+
*/
|
|
9415
|
+
export function registerLinkedEditingRangeProvider(selector: DocumentSelector, provider: LinkedEditingRangeProvider): Disposable;
|
|
9416
|
+
|
|
9417
|
+
/**
|
|
9418
|
+
* Creates a new {@link LanguageStatusItem language status item}.
|
|
9419
|
+
*
|
|
9420
|
+
* @param id The identifier of the item.
|
|
9421
|
+
* @param selector The document selector that defines for what editors the item shows.
|
|
9422
|
+
*/
|
|
9423
|
+
export function createLanguageStatusItem(id: string, selector: DocumentSelector): LanguageStatusItem;
|
|
9235
9424
|
}
|
|
9236
9425
|
|
|
9237
9426
|
/**
|
|
@@ -9648,6 +9837,11 @@ export module '@theia/plugin' {
|
|
|
9648
9837
|
*/
|
|
9649
9838
|
readonly name: string;
|
|
9650
9839
|
|
|
9840
|
+
/**
|
|
9841
|
+
* The workspace folder of this session or `undefined` for a folderless setup.
|
|
9842
|
+
*/
|
|
9843
|
+
readonly workspaceFolder: WorkspaceFolder | undefined;
|
|
9844
|
+
|
|
9651
9845
|
/**
|
|
9652
9846
|
* The "resolved" [debug configuration](#DebugConfiguration) of this session.
|
|
9653
9847
|
*/
|
|
@@ -11334,6 +11528,50 @@ export module '@theia/plugin' {
|
|
|
11334
11528
|
provideCallHierarchyOutgoingCalls(item: CallHierarchyItem, token: CancellationToken): ProviderResult<CallHierarchyOutgoingCall[]>;
|
|
11335
11529
|
}
|
|
11336
11530
|
|
|
11531
|
+
/**
|
|
11532
|
+
* Represents a list of ranges that can be edited together along with a word pattern to describe valid range contents.
|
|
11533
|
+
*/
|
|
11534
|
+
export class LinkedEditingRanges {
|
|
11535
|
+
/**
|
|
11536
|
+
* Create a new linked editing ranges object.
|
|
11537
|
+
*
|
|
11538
|
+
* @param ranges A list of ranges that can be edited together
|
|
11539
|
+
* @param wordPattern An optional word pattern that describes valid contents for the given ranges
|
|
11540
|
+
*/
|
|
11541
|
+
constructor(ranges: Range[], wordPattern?: RegExp);
|
|
11542
|
+
|
|
11543
|
+
/**
|
|
11544
|
+
* A list of ranges that can be edited together. The ranges must have
|
|
11545
|
+
* identical length and text content. The ranges cannot overlap.
|
|
11546
|
+
*/
|
|
11547
|
+
readonly ranges: Range[];
|
|
11548
|
+
|
|
11549
|
+
/**
|
|
11550
|
+
* An optional word pattern that describes valid contents for the given ranges.
|
|
11551
|
+
* If no pattern is provided, the language configuration's word pattern will be used.
|
|
11552
|
+
*/
|
|
11553
|
+
readonly wordPattern?: RegExp;
|
|
11554
|
+
}
|
|
11555
|
+
|
|
11556
|
+
/**
|
|
11557
|
+
* The linked editing range provider interface defines the contract between extensions and
|
|
11558
|
+
* the linked editing feature.
|
|
11559
|
+
*/
|
|
11560
|
+
export interface LinkedEditingRangeProvider {
|
|
11561
|
+
/**
|
|
11562
|
+
* For a given position in a document, returns the range of the symbol at the position and all ranges
|
|
11563
|
+
* that have the same content. A change to one of the ranges can be applied to all other ranges if the new content
|
|
11564
|
+
* is valid. An optional word pattern can be returned with the result to describe valid contents.
|
|
11565
|
+
* If no result-specific word pattern is provided, the word pattern from the language configuration is used.
|
|
11566
|
+
*
|
|
11567
|
+
* @param document The document in which the provider was invoked.
|
|
11568
|
+
* @param position The position at which the provider was invoked.
|
|
11569
|
+
* @param token A cancellation token.
|
|
11570
|
+
* @return A list of ranges that can be edited together
|
|
11571
|
+
*/
|
|
11572
|
+
provideLinkedEditingRanges(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<LinkedEditingRanges>;
|
|
11573
|
+
}
|
|
11574
|
+
|
|
11337
11575
|
/**
|
|
11338
11576
|
* Represents a session of a currently logged in user.
|
|
11339
11577
|
*/
|