@theia/plugin 1.26.0-next.3 → 1.26.0-next.30
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 +213 -4
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.30+a413e17a78f",
|
|
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": "a413e17a78f9b6f468e62e579fcc8340decddfba"
|
|
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 {
|
|
@@ -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.
|
|
@@ -7919,6 +7982,82 @@ export module '@theia/plugin' {
|
|
|
7919
7982
|
dispose(): void;
|
|
7920
7983
|
}
|
|
7921
7984
|
|
|
7985
|
+
/**
|
|
7986
|
+
* Represents the severity of a language status item.
|
|
7987
|
+
*/
|
|
7988
|
+
export enum LanguageStatusSeverity {
|
|
7989
|
+
Information = 0,
|
|
7990
|
+
Warning = 1,
|
|
7991
|
+
Error = 2
|
|
7992
|
+
}
|
|
7993
|
+
|
|
7994
|
+
/**
|
|
7995
|
+
* A language status item is the preferred way to present language status reports for the active text editors,
|
|
7996
|
+
* such as selected linter or notifying about a configuration problem.
|
|
7997
|
+
*/
|
|
7998
|
+
export interface LanguageStatusItem {
|
|
7999
|
+
|
|
8000
|
+
/**
|
|
8001
|
+
* The identifier of this item.
|
|
8002
|
+
*/
|
|
8003
|
+
readonly id: string;
|
|
8004
|
+
|
|
8005
|
+
/**
|
|
8006
|
+
* The short name of this item, like 'Java Language Status', etc.
|
|
8007
|
+
*/
|
|
8008
|
+
name: string | undefined;
|
|
8009
|
+
|
|
8010
|
+
/**
|
|
8011
|
+
* A {@link DocumentSelector selector} that defines for what editors
|
|
8012
|
+
* this item shows.
|
|
8013
|
+
*/
|
|
8014
|
+
selector: DocumentSelector;
|
|
8015
|
+
|
|
8016
|
+
/**
|
|
8017
|
+
* The severity of this item.
|
|
8018
|
+
*
|
|
8019
|
+
* Defaults to {@link LanguageStatusSeverity.Information information}. You can use this property to
|
|
8020
|
+
* signal to users that there is a problem that needs attention, like a missing executable or an
|
|
8021
|
+
* invalid configuration.
|
|
8022
|
+
*/
|
|
8023
|
+
severity: LanguageStatusSeverity;
|
|
8024
|
+
|
|
8025
|
+
/**
|
|
8026
|
+
* The text to show for the entry. You can embed icons in the text by leveraging the syntax:
|
|
8027
|
+
*
|
|
8028
|
+
* `My text $(icon-name) contains icons like $(icon-name) this one.`
|
|
8029
|
+
*
|
|
8030
|
+
* Where the icon-name is taken from the ThemeIcon [icon set](https://code.visualstudio.com/api/references/icons-in-labels#icon-listing), e.g.
|
|
8031
|
+
* `light-bulb`, `thumbsup`, `zap` etc.
|
|
8032
|
+
*/
|
|
8033
|
+
text: string;
|
|
8034
|
+
|
|
8035
|
+
/**
|
|
8036
|
+
* Optional, human-readable details for this item.
|
|
8037
|
+
*/
|
|
8038
|
+
detail?: string;
|
|
8039
|
+
|
|
8040
|
+
/**
|
|
8041
|
+
* Controls whether the item is shown as "busy". Defaults to `false`.
|
|
8042
|
+
*/
|
|
8043
|
+
busy: boolean;
|
|
8044
|
+
|
|
8045
|
+
/**
|
|
8046
|
+
* A {@linkcode Command command} for this item.
|
|
8047
|
+
*/
|
|
8048
|
+
command: Command | undefined;
|
|
8049
|
+
|
|
8050
|
+
/**
|
|
8051
|
+
* Accessibility information used when a screen reader interacts with this item
|
|
8052
|
+
*/
|
|
8053
|
+
accessibilityInformation?: AccessibilityInformation;
|
|
8054
|
+
|
|
8055
|
+
/**
|
|
8056
|
+
* Dispose and free associated resources.
|
|
8057
|
+
*/
|
|
8058
|
+
dispose(): void;
|
|
8059
|
+
}
|
|
8060
|
+
|
|
7922
8061
|
/**
|
|
7923
8062
|
* A code action represents a change that can be performed in code, e.g. to fix a problem or
|
|
7924
8063
|
* to refactor code.
|
|
@@ -9232,6 +9371,27 @@ export module '@theia/plugin' {
|
|
|
9232
9371
|
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
|
|
9233
9372
|
*/
|
|
9234
9373
|
export function registerCallHierarchyProvider(selector: DocumentSelector, provider: CallHierarchyProvider): Disposable;
|
|
9374
|
+
|
|
9375
|
+
/**
|
|
9376
|
+
* Register a linked editing range provider.
|
|
9377
|
+
*
|
|
9378
|
+
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9379
|
+
* by their {@link languages.match score} and the best-matching provider that has a result is used. Failure
|
|
9380
|
+
* of the selected provider will cause a failure of the whole operation.
|
|
9381
|
+
*
|
|
9382
|
+
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9383
|
+
* @param provider A linked editing range provider.
|
|
9384
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
9385
|
+
*/
|
|
9386
|
+
export function registerLinkedEditingRangeProvider(selector: DocumentSelector, provider: LinkedEditingRangeProvider): Disposable;
|
|
9387
|
+
|
|
9388
|
+
/**
|
|
9389
|
+
* Creates a new {@link LanguageStatusItem language status item}.
|
|
9390
|
+
*
|
|
9391
|
+
* @param id The identifier of the item.
|
|
9392
|
+
* @param selector The document selector that defines for what editors the item shows.
|
|
9393
|
+
*/
|
|
9394
|
+
export function createLanguageStatusItem(id: string, selector: DocumentSelector): LanguageStatusItem;
|
|
9235
9395
|
}
|
|
9236
9396
|
|
|
9237
9397
|
/**
|
|
@@ -9648,6 +9808,11 @@ export module '@theia/plugin' {
|
|
|
9648
9808
|
*/
|
|
9649
9809
|
readonly name: string;
|
|
9650
9810
|
|
|
9811
|
+
/**
|
|
9812
|
+
* The workspace folder of this session or `undefined` for a folderless setup.
|
|
9813
|
+
*/
|
|
9814
|
+
readonly workspaceFolder: WorkspaceFolder | undefined;
|
|
9815
|
+
|
|
9651
9816
|
/**
|
|
9652
9817
|
* The "resolved" [debug configuration](#DebugConfiguration) of this session.
|
|
9653
9818
|
*/
|
|
@@ -11334,6 +11499,50 @@ export module '@theia/plugin' {
|
|
|
11334
11499
|
provideCallHierarchyOutgoingCalls(item: CallHierarchyItem, token: CancellationToken): ProviderResult<CallHierarchyOutgoingCall[]>;
|
|
11335
11500
|
}
|
|
11336
11501
|
|
|
11502
|
+
/**
|
|
11503
|
+
* Represents a list of ranges that can be edited together along with a word pattern to describe valid range contents.
|
|
11504
|
+
*/
|
|
11505
|
+
export class LinkedEditingRanges {
|
|
11506
|
+
/**
|
|
11507
|
+
* Create a new linked editing ranges object.
|
|
11508
|
+
*
|
|
11509
|
+
* @param ranges A list of ranges that can be edited together
|
|
11510
|
+
* @param wordPattern An optional word pattern that describes valid contents for the given ranges
|
|
11511
|
+
*/
|
|
11512
|
+
constructor(ranges: Range[], wordPattern?: RegExp);
|
|
11513
|
+
|
|
11514
|
+
/**
|
|
11515
|
+
* A list of ranges that can be edited together. The ranges must have
|
|
11516
|
+
* identical length and text content. The ranges cannot overlap.
|
|
11517
|
+
*/
|
|
11518
|
+
readonly ranges: Range[];
|
|
11519
|
+
|
|
11520
|
+
/**
|
|
11521
|
+
* An optional word pattern that describes valid contents for the given ranges.
|
|
11522
|
+
* If no pattern is provided, the language configuration's word pattern will be used.
|
|
11523
|
+
*/
|
|
11524
|
+
readonly wordPattern?: RegExp;
|
|
11525
|
+
}
|
|
11526
|
+
|
|
11527
|
+
/**
|
|
11528
|
+
* The linked editing range provider interface defines the contract between extensions and
|
|
11529
|
+
* the linked editing feature.
|
|
11530
|
+
*/
|
|
11531
|
+
export interface LinkedEditingRangeProvider {
|
|
11532
|
+
/**
|
|
11533
|
+
* For a given position in a document, returns the range of the symbol at the position and all ranges
|
|
11534
|
+
* that have the same content. A change to one of the ranges can be applied to all other ranges if the new content
|
|
11535
|
+
* is valid. An optional word pattern can be returned with the result to describe valid contents.
|
|
11536
|
+
* If no result-specific word pattern is provided, the word pattern from the language configuration is used.
|
|
11537
|
+
*
|
|
11538
|
+
* @param document The document in which the provider was invoked.
|
|
11539
|
+
* @param position The position at which the provider was invoked.
|
|
11540
|
+
* @param token A cancellation token.
|
|
11541
|
+
* @return A list of ranges that can be edited together
|
|
11542
|
+
*/
|
|
11543
|
+
provideLinkedEditingRanges(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<LinkedEditingRanges>;
|
|
11544
|
+
}
|
|
11545
|
+
|
|
11337
11546
|
/**
|
|
11338
11547
|
* Represents a session of a currently logged in user.
|
|
11339
11548
|
*/
|