@theia/plugin 1.42.1 → 1.43.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.43.1",
|
|
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.43.1"
|
|
31
31
|
},
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "df48285b7d3340e0109e89ffdb0f437ba6710378"
|
|
36
36
|
}
|
package/src/theia.d.ts
CHANGED
|
@@ -3574,6 +3574,24 @@ export module '@theia/plugin' {
|
|
|
3574
3574
|
Prepend = 3
|
|
3575
3575
|
}
|
|
3576
3576
|
|
|
3577
|
+
/**
|
|
3578
|
+
* Options applied to the mutator.
|
|
3579
|
+
*/
|
|
3580
|
+
export interface EnvironmentVariableMutatorOptions {
|
|
3581
|
+
/**
|
|
3582
|
+
* Apply to the environment just before the process is created. Defaults to true
|
|
3583
|
+
*/
|
|
3584
|
+
applyAtProcessCreation?: boolean;
|
|
3585
|
+
|
|
3586
|
+
/**
|
|
3587
|
+
* Apply to the environment in the shell integration script. Note that this _will not_ apply
|
|
3588
|
+
* the mutator if shell integration is disabled or not working for some reason. Defaults to
|
|
3589
|
+
* false.
|
|
3590
|
+
* @stubbed
|
|
3591
|
+
*/
|
|
3592
|
+
applyAtShellIntegration?: boolean;
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3577
3595
|
/**
|
|
3578
3596
|
* A type of mutation and its value to be applied to an environment variable.
|
|
3579
3597
|
*/
|
|
@@ -3587,6 +3605,11 @@ export module '@theia/plugin' {
|
|
|
3587
3605
|
* The value to use for the variable.
|
|
3588
3606
|
*/
|
|
3589
3607
|
readonly value: string;
|
|
3608
|
+
|
|
3609
|
+
/**
|
|
3610
|
+
* Options applied to the mutator.
|
|
3611
|
+
*/
|
|
3612
|
+
readonly options: EnvironmentVariableMutatorOptions;
|
|
3590
3613
|
}
|
|
3591
3614
|
|
|
3592
3615
|
/**
|
|
@@ -3617,7 +3640,7 @@ export module '@theia/plugin' {
|
|
|
3617
3640
|
* @param variable The variable to replace.
|
|
3618
3641
|
* @param value The value to replace the variable with.
|
|
3619
3642
|
*/
|
|
3620
|
-
replace(variable: string, value: string): void;
|
|
3643
|
+
replace(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void;
|
|
3621
3644
|
|
|
3622
3645
|
/**
|
|
3623
3646
|
* Append a value to an environment variable.
|
|
@@ -3628,7 +3651,7 @@ export module '@theia/plugin' {
|
|
|
3628
3651
|
* @param variable The variable to append to.
|
|
3629
3652
|
* @param value The value to append to the variable.
|
|
3630
3653
|
*/
|
|
3631
|
-
append(variable: string, value: string): void;
|
|
3654
|
+
append(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void;
|
|
3632
3655
|
|
|
3633
3656
|
/**
|
|
3634
3657
|
* Prepend a value to an environment variable.
|
|
@@ -3639,7 +3662,7 @@ export module '@theia/plugin' {
|
|
|
3639
3662
|
* @param variable The variable to prepend.
|
|
3640
3663
|
* @param value The value to prepend to the variable.
|
|
3641
3664
|
*/
|
|
3642
|
-
prepend(variable: string, value: string): void;
|
|
3665
|
+
prepend(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void;
|
|
3643
3666
|
|
|
3644
3667
|
/**
|
|
3645
3668
|
* Gets the mutator that this collection applies to a variable, if any.
|
|
@@ -3669,6 +3692,39 @@ export module '@theia/plugin' {
|
|
|
3669
3692
|
clear(): void;
|
|
3670
3693
|
}
|
|
3671
3694
|
|
|
3695
|
+
/**
|
|
3696
|
+
* A collection of mutations that an extension can apply to a process environment. Applies to all scopes.
|
|
3697
|
+
*/
|
|
3698
|
+
export interface GlobalEnvironmentVariableCollection extends EnvironmentVariableCollection {
|
|
3699
|
+
/**
|
|
3700
|
+
* Gets scope-specific environment variable collection for the extension. This enables alterations to
|
|
3701
|
+
* terminal environment variables solely within the designated scope, and is applied in addition to (and
|
|
3702
|
+
* after) the global collection.
|
|
3703
|
+
*
|
|
3704
|
+
* Each object obtained through this method is isolated and does not impact objects for other scopes,
|
|
3705
|
+
* including the global collection.
|
|
3706
|
+
*
|
|
3707
|
+
* @param scope The scope to which the environment variable collection applies to.
|
|
3708
|
+
*
|
|
3709
|
+
* If a scope parameter is omitted, collection applicable to all relevant scopes for that parameter is
|
|
3710
|
+
* returned. For instance, if the 'workspaceFolder' parameter is not specified, the collection that applies
|
|
3711
|
+
* across all workspace folders will be returned.
|
|
3712
|
+
*
|
|
3713
|
+
* @return Environment variable collection for the passed in scope.
|
|
3714
|
+
*/
|
|
3715
|
+
getScoped(scope: EnvironmentVariableScope): EnvironmentVariableCollection;
|
|
3716
|
+
}
|
|
3717
|
+
|
|
3718
|
+
/**
|
|
3719
|
+
* The scope object to which the environment variable collection applies.
|
|
3720
|
+
*/
|
|
3721
|
+
export interface EnvironmentVariableScope {
|
|
3722
|
+
/**
|
|
3723
|
+
* Any specific workspace folder to get collection for.
|
|
3724
|
+
*/
|
|
3725
|
+
workspaceFolder?: WorkspaceFolder;
|
|
3726
|
+
}
|
|
3727
|
+
|
|
3672
3728
|
/**
|
|
3673
3729
|
* The ExtensionMode is provided on the `ExtensionContext` and indicates the
|
|
3674
3730
|
* mode the specific extension is running in.
|
|
@@ -3856,7 +3912,7 @@ export module '@theia/plugin' {
|
|
|
3856
3912
|
* Gets the extension's environment variable collection for this workspace, enabling changes
|
|
3857
3913
|
* to be applied to terminal environment variables.
|
|
3858
3914
|
*/
|
|
3859
|
-
readonly environmentVariableCollection:
|
|
3915
|
+
readonly environmentVariableCollection: GlobalEnvironmentVariableCollection;
|
|
3860
3916
|
|
|
3861
3917
|
/**
|
|
3862
3918
|
* Get the absolute path of a resource contained in the extension.
|
|
@@ -10240,6 +10296,26 @@ export module '@theia/plugin' {
|
|
|
10240
10296
|
options: FormattingOptions,
|
|
10241
10297
|
token: CancellationToken | undefined
|
|
10242
10298
|
): ProviderResult<TextEdit[] | undefined>;
|
|
10299
|
+
|
|
10300
|
+
/**
|
|
10301
|
+
* Provide formatting edits for multiple ranges in a document.
|
|
10302
|
+
*
|
|
10303
|
+
* This function is optional but allows a formatter to perform faster when formatting only modified ranges or when
|
|
10304
|
+
* formatting a large number of selections.
|
|
10305
|
+
*
|
|
10306
|
+
* The given ranges are hints and providers can decide to format a smaller
|
|
10307
|
+
* or larger range. Often this is done by adjusting the start and end
|
|
10308
|
+
* of the range to full syntax nodes.
|
|
10309
|
+
*
|
|
10310
|
+
* @param document The document in which the command was invoked.
|
|
10311
|
+
* @param ranges The ranges which should be formatted.
|
|
10312
|
+
* @param options Options controlling formatting.
|
|
10313
|
+
* @param token A cancellation token.
|
|
10314
|
+
* @returns A set of text edits or a thenable that resolves to such. The lack of a result can be
|
|
10315
|
+
* signaled by returning `undefined`, `null`, or an empty array.
|
|
10316
|
+
* @stubbed @monaco-uplift the current monaco version does not yet use this API
|
|
10317
|
+
*/
|
|
10318
|
+
provideDocumentRangesFormattingEdits?(document: TextDocument, ranges: Range[], options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
|
10243
10319
|
}
|
|
10244
10320
|
|
|
10245
10321
|
/**
|
|
@@ -15733,6 +15809,8 @@ export module '@theia/plugin' {
|
|
|
15733
15809
|
export function registerNotebookCellStatusBarItemProvider(notebookType: string, provider: NotebookCellStatusBarItemProvider): Disposable;
|
|
15734
15810
|
}
|
|
15735
15811
|
|
|
15812
|
+
// based on VS Code API 1.81.0
|
|
15813
|
+
|
|
15736
15814
|
/**
|
|
15737
15815
|
* Namespace for testing functionality. Tests are published by registering
|
|
15738
15816
|
* {@link TestController} instances, then adding {@link TestItem TestItems}.
|
|
@@ -15746,7 +15824,6 @@ export module '@theia/plugin' {
|
|
|
15746
15824
|
* @param id Identifier for the controller, must be globally unique.
|
|
15747
15825
|
* @param label A human-readable label for the controller.
|
|
15748
15826
|
* @returns An instance of the {@link TestController}.
|
|
15749
|
-
* @stubbed
|
|
15750
15827
|
*/
|
|
15751
15828
|
export function createTestController(id: string, label: string): TestController;
|
|
15752
15829
|
}
|
|
@@ -15791,14 +15868,12 @@ export module '@theia/plugin' {
|
|
|
15791
15868
|
* normally and the user requests to re-run them in debug mode, the editor
|
|
15792
15869
|
* will attempt use a configuration with the same label of the `Debug`
|
|
15793
15870
|
* kind. If there is no such configuration, the default will be used.
|
|
15794
|
-
* @stubbed
|
|
15795
15871
|
*/
|
|
15796
15872
|
label: string;
|
|
15797
15873
|
|
|
15798
15874
|
/**
|
|
15799
15875
|
* Configures what kind of execution this profile controls. If there
|
|
15800
15876
|
* are no profiles for a kind, it will not be available in the UI.
|
|
15801
|
-
* @stubbed
|
|
15802
15877
|
*/
|
|
15803
15878
|
readonly kind: TestRunProfileKind;
|
|
15804
15879
|
|
|
@@ -15808,7 +15883,6 @@ export module '@theia/plugin' {
|
|
|
15808
15883
|
* the generic "run all" button, then the default profile for
|
|
15809
15884
|
* {@link TestRunProfileKind.Run} will be executed, although the
|
|
15810
15885
|
* user can configure this.
|
|
15811
|
-
* @stubbed
|
|
15812
15886
|
*/
|
|
15813
15887
|
isDefault: boolean;
|
|
15814
15888
|
|
|
@@ -15816,14 +15890,12 @@ export module '@theia/plugin' {
|
|
|
15816
15890
|
* Whether this profile supports continuous running of requests. If so,
|
|
15817
15891
|
* then {@link TestRunRequest.continuous} may be set to `true`. Defaults
|
|
15818
15892
|
* to false.
|
|
15819
|
-
* @stubbed
|
|
15820
15893
|
*/
|
|
15821
15894
|
supportsContinuousRun: boolean;
|
|
15822
15895
|
|
|
15823
15896
|
/**
|
|
15824
15897
|
* Associated tag for the profile. If this is set, only {@link TestItem}
|
|
15825
15898
|
* instances with the same tag will be eligible to execute in this profile.
|
|
15826
|
-
* @stubbed
|
|
15827
15899
|
*/
|
|
15828
15900
|
tag: TestTag | undefined;
|
|
15829
15901
|
|
|
@@ -15832,7 +15904,6 @@ export module '@theia/plugin' {
|
|
|
15832
15904
|
* UI, and this method will be invoked when it's clicked. When called,
|
|
15833
15905
|
* you can take other editor actions, such as showing a quick pick or
|
|
15834
15906
|
* opening a configuration file.
|
|
15835
|
-
* @stubbed
|
|
15836
15907
|
*/
|
|
15837
15908
|
configureHandler: (() => void) | undefined;
|
|
15838
15909
|
|
|
@@ -15852,13 +15923,11 @@ export module '@theia/plugin' {
|
|
|
15852
15923
|
* test run. If cancellation is requested on this token, all {@link TestRun}
|
|
15853
15924
|
* instances associated with the request will be
|
|
15854
15925
|
* automatically cancelled as well.
|
|
15855
|
-
* @stubbed
|
|
15856
15926
|
*/
|
|
15857
15927
|
runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void;
|
|
15858
15928
|
|
|
15859
15929
|
/**
|
|
15860
15930
|
* Deletes the run profile.
|
|
15861
|
-
* @stubbed
|
|
15862
15931
|
*/
|
|
15863
15932
|
dispose(): void;
|
|
15864
15933
|
}
|
|
@@ -15871,15 +15940,13 @@ export module '@theia/plugin' {
|
|
|
15871
15940
|
*/
|
|
15872
15941
|
export interface TestController {
|
|
15873
15942
|
/**
|
|
15874
|
-
* The id of the controller passed in {@link
|
|
15943
|
+
* The id of the controller passed in {@link tests.createTestController}.
|
|
15875
15944
|
* This must be globally unique.
|
|
15876
|
-
* @stubbed
|
|
15877
15945
|
*/
|
|
15878
15946
|
readonly id: string;
|
|
15879
15947
|
|
|
15880
15948
|
/**
|
|
15881
15949
|
* Human-readable label for the test controller.
|
|
15882
|
-
* @stubbed
|
|
15883
15950
|
*/
|
|
15884
15951
|
label: string;
|
|
15885
15952
|
|
|
@@ -15889,12 +15956,11 @@ export module '@theia/plugin' {
|
|
|
15889
15956
|
* "test tree."
|
|
15890
15957
|
*
|
|
15891
15958
|
* The extension controls when to add tests. For example, extensions should
|
|
15892
|
-
* add tests for a file when {@link
|
|
15959
|
+
* add tests for a file when {@link workspace.onDidOpenTextDocument}
|
|
15893
15960
|
* fires in order for decorations for tests within a file to be visible.
|
|
15894
15961
|
*
|
|
15895
15962
|
* However, the editor may sometimes explicitly request children using the
|
|
15896
15963
|
* {@link resolveHandler} See the documentation on that method for more details.
|
|
15897
|
-
* @stubbed
|
|
15898
15964
|
*/
|
|
15899
15965
|
readonly items: TestItemCollection;
|
|
15900
15966
|
|
|
@@ -15909,7 +15975,6 @@ export module '@theia/plugin' {
|
|
|
15909
15975
|
* @param supportsContinuousRun Whether the profile supports continuous running.
|
|
15910
15976
|
* @returns An instance of a {@link TestRunProfile}, which is automatically
|
|
15911
15977
|
* associated with this controller.
|
|
15912
|
-
* @stubbed
|
|
15913
15978
|
*/
|
|
15914
15979
|
createRunProfile(label: string, kind: TestRunProfileKind, runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void, isDefault?: boolean, tag?: TestTag, supportsContinuousRun?: boolean): TestRunProfile;
|
|
15915
15980
|
|
|
@@ -15917,7 +15982,7 @@ export module '@theia/plugin' {
|
|
|
15917
15982
|
* A function provided by the extension that the editor may call to request
|
|
15918
15983
|
* children of a test item, if the {@link TestItem.canResolveChildren} is
|
|
15919
15984
|
* `true`. When called, the item should discover children and call
|
|
15920
|
-
* {@link
|
|
15985
|
+
* {@link TestController.createTestItem} as children are discovered.
|
|
15921
15986
|
*
|
|
15922
15987
|
* Generally the extension manages the lifecycle of test items, but under
|
|
15923
15988
|
* certain conditions the editor may request the children of a specific
|
|
@@ -15930,7 +15995,6 @@ export module '@theia/plugin' {
|
|
|
15930
15995
|
*
|
|
15931
15996
|
* @param item An unresolved test item for which children are being
|
|
15932
15997
|
* requested, or `undefined` to resolve the controller's initial {@link TestController.items items}.
|
|
15933
|
-
* @stubbed
|
|
15934
15998
|
*/
|
|
15935
15999
|
resolveHandler?: (item: TestItem | undefined) => Thenable<void> | void;
|
|
15936
16000
|
|
|
@@ -15944,7 +16008,6 @@ export module '@theia/plugin' {
|
|
|
15944
16008
|
* a {@link FileSystemWatcher} for example, and use this method as a fallback.
|
|
15945
16009
|
*
|
|
15946
16010
|
* @returns A thenable that resolves when tests have been refreshed.
|
|
15947
|
-
* @stubbed
|
|
15948
16011
|
*/
|
|
15949
16012
|
refreshHandler: ((token: CancellationToken) => Thenable<void> | void) | undefined;
|
|
15950
16013
|
|
|
@@ -15968,7 +16031,6 @@ export module '@theia/plugin' {
|
|
|
15968
16031
|
* a file already saved externally, such as a coverage information file.
|
|
15969
16032
|
* @returns An instance of the {@link TestRun}. It will be considered "running"
|
|
15970
16033
|
* from the moment this method is invoked until {@link TestRun.end} is called.
|
|
15971
|
-
* @stubbed
|
|
15972
16034
|
*/
|
|
15973
16035
|
createTestRun(request: TestRunRequest, name?: string, persist?: boolean): TestRun;
|
|
15974
16036
|
|
|
@@ -15981,7 +16043,6 @@ export module '@theia/plugin' {
|
|
|
15981
16043
|
* in the {@link TestItemCollection} it's added to.
|
|
15982
16044
|
* @param label Human-readable label of the test item.
|
|
15983
16045
|
* @param uri URI this TestItem is associated with. May be a file or directory.
|
|
15984
|
-
* @stubbed
|
|
15985
16046
|
*/
|
|
15986
16047
|
createTestItem(id: string, label: string, uri?: Uri): TestItem;
|
|
15987
16048
|
|
|
@@ -16000,23 +16061,21 @@ export module '@theia/plugin' {
|
|
|
16000
16061
|
* in the editor's UI.
|
|
16001
16062
|
*
|
|
16002
16063
|
* @param item Item to mark as outdated. If undefined, all the controller's items are marked outdated.
|
|
16003
|
-
* @stubbed
|
|
16004
16064
|
*/
|
|
16005
16065
|
invalidateTestResults(items?: TestItem | readonly TestItem[]): void;
|
|
16006
16066
|
|
|
16007
16067
|
/**
|
|
16008
16068
|
* Unregisters the test controller, disposing of its associated tests
|
|
16009
16069
|
* and unpersisted results.
|
|
16010
|
-
* @stubbed
|
|
16011
16070
|
*/
|
|
16012
16071
|
dispose(): void;
|
|
16013
16072
|
}
|
|
16014
16073
|
|
|
16015
16074
|
/**
|
|
16016
16075
|
* A TestRunRequest is a precursor to a {@link TestRun}, which in turn is
|
|
16017
|
-
* created by passing a request to {@link
|
|
16018
|
-
* contains information about which tests should be run, which
|
|
16019
|
-
* run, and how they are run (via the {@link TestRunRequest.profile profile}).
|
|
16076
|
+
* created by passing a request to {@link TestController.createTestRun}. The
|
|
16077
|
+
* TestRunRequest contains information about which tests should be run, which
|
|
16078
|
+
* should not be run, and how they are run (via the {@link TestRunRequest.profile profile}).
|
|
16020
16079
|
*
|
|
16021
16080
|
* In general, TestRunRequests are created by the editor and pass to
|
|
16022
16081
|
* {@link TestRunProfile.runHandler}, however you can also create test
|
|
@@ -16066,48 +16125,43 @@ export module '@theia/plugin' {
|
|
|
16066
16125
|
}
|
|
16067
16126
|
|
|
16068
16127
|
/**
|
|
16069
|
-
*
|
|
16128
|
+
* A TestRun represents an in-progress or completed test run and
|
|
16129
|
+
* provides methods to report the state of individual tests in the run.
|
|
16070
16130
|
*/
|
|
16071
16131
|
export interface TestRun {
|
|
16072
16132
|
/**
|
|
16073
16133
|
* The human-readable name of the run. This can be used to
|
|
16074
16134
|
* disambiguate multiple sets of results in a test run. It is useful if
|
|
16075
16135
|
* tests are run across multiple platforms, for example.
|
|
16076
|
-
* @stubbed
|
|
16077
16136
|
*/
|
|
16078
16137
|
readonly name: string | undefined;
|
|
16079
16138
|
|
|
16080
16139
|
/**
|
|
16081
16140
|
* A cancellation token which will be triggered when the test run is
|
|
16082
16141
|
* canceled from the UI.
|
|
16083
|
-
* @stubbed
|
|
16084
16142
|
*/
|
|
16085
16143
|
readonly token: CancellationToken;
|
|
16086
16144
|
|
|
16087
16145
|
/**
|
|
16088
16146
|
* Whether the test run will be persisted across reloads by the editor.
|
|
16089
|
-
* @stubbed
|
|
16090
16147
|
*/
|
|
16091
16148
|
readonly isPersisted: boolean;
|
|
16092
16149
|
|
|
16093
16150
|
/**
|
|
16094
16151
|
* Indicates a test is queued for later execution.
|
|
16095
16152
|
* @param test Test item to update.
|
|
16096
|
-
* @stubbed
|
|
16097
16153
|
*/
|
|
16098
16154
|
enqueued(test: TestItem): void;
|
|
16099
16155
|
|
|
16100
16156
|
/**
|
|
16101
16157
|
* Indicates a test has started running.
|
|
16102
16158
|
* @param test Test item to update.
|
|
16103
|
-
* @stubbed
|
|
16104
16159
|
*/
|
|
16105
16160
|
started(test: TestItem): void;
|
|
16106
16161
|
|
|
16107
16162
|
/**
|
|
16108
16163
|
* Indicates a test has been skipped.
|
|
16109
16164
|
* @param test Test item to update.
|
|
16110
|
-
* @stubbed
|
|
16111
16165
|
*/
|
|
16112
16166
|
skipped(test: TestItem): void;
|
|
16113
16167
|
|
|
@@ -16117,7 +16171,6 @@ export module '@theia/plugin' {
|
|
|
16117
16171
|
* @param test Test item to update.
|
|
16118
16172
|
* @param message Messages associated with the test failure.
|
|
16119
16173
|
* @param duration How long the test took to execute, in milliseconds.
|
|
16120
|
-
* @stubbed
|
|
16121
16174
|
*/
|
|
16122
16175
|
failed(test: TestItem, message: TestMessage | readonly TestMessage[], duration?: number): void;
|
|
16123
16176
|
|
|
@@ -16129,7 +16182,6 @@ export module '@theia/plugin' {
|
|
|
16129
16182
|
* @param test Test item to update.
|
|
16130
16183
|
* @param message Messages associated with the test failure.
|
|
16131
16184
|
* @param duration How long the test took to execute, in milliseconds.
|
|
16132
|
-
* @stubbed
|
|
16133
16185
|
*/
|
|
16134
16186
|
errored(test: TestItem, message: TestMessage | readonly TestMessage[], duration?: number): void;
|
|
16135
16187
|
|
|
@@ -16137,27 +16189,25 @@ export module '@theia/plugin' {
|
|
|
16137
16189
|
* Indicates a test has passed.
|
|
16138
16190
|
* @param test Test item to update.
|
|
16139
16191
|
* @param duration How long the test took to execute, in milliseconds.
|
|
16140
|
-
* @stubbed
|
|
16141
16192
|
*/
|
|
16142
16193
|
passed(test: TestItem, duration?: number): void;
|
|
16143
16194
|
|
|
16144
16195
|
/**
|
|
16145
16196
|
* Appends raw output from the test runner. On the user's request, the
|
|
16146
16197
|
* output will be displayed in a terminal. ANSI escape sequences,
|
|
16147
|
-
* such as colors and text styles, are supported.
|
|
16198
|
+
* such as colors and text styles, are supported. New lines must be given
|
|
16199
|
+
* as CRLF (`\r\n`) rather than LF (`\n`).
|
|
16148
16200
|
*
|
|
16149
16201
|
* @param output Output text to append.
|
|
16150
16202
|
* @param location Indicate that the output was logged at the given
|
|
16151
16203
|
* location.
|
|
16152
16204
|
* @param test Test item to associate the output with.
|
|
16153
|
-
* @stubbed
|
|
16154
16205
|
*/
|
|
16155
16206
|
appendOutput(output: string, location?: Location, test?: TestItem): void;
|
|
16156
16207
|
|
|
16157
16208
|
/**
|
|
16158
|
-
* Signals
|
|
16209
|
+
* Signals the end of the test run. Any tests included in the run whose
|
|
16159
16210
|
* states have not been updated will have their state reset.
|
|
16160
|
-
* @stubbed
|
|
16161
16211
|
*/
|
|
16162
16212
|
end(): void;
|
|
16163
16213
|
}
|
|
@@ -16169,14 +16219,12 @@ export module '@theia/plugin' {
|
|
|
16169
16219
|
export interface TestItemCollection extends Iterable<[id: string, testItem: TestItem]> {
|
|
16170
16220
|
/**
|
|
16171
16221
|
* Gets the number of items in the collection.
|
|
16172
|
-
* @stubbed
|
|
16173
16222
|
*/
|
|
16174
16223
|
readonly size: number;
|
|
16175
16224
|
|
|
16176
16225
|
/**
|
|
16177
16226
|
* Replaces the items stored by the collection.
|
|
16178
16227
|
* @param items Items to store.
|
|
16179
|
-
* @stubbed
|
|
16180
16228
|
*/
|
|
16181
16229
|
replace(items: readonly TestItem[]): void;
|
|
16182
16230
|
|
|
@@ -16185,7 +16233,6 @@ export module '@theia/plugin' {
|
|
|
16185
16233
|
*
|
|
16186
16234
|
* @param callback Function to execute for each entry.
|
|
16187
16235
|
* @param thisArg The `this` context used when invoking the handler function.
|
|
16188
|
-
* @stubbed
|
|
16189
16236
|
*/
|
|
16190
16237
|
forEach(callback: (item: TestItem, collection: TestItemCollection) => unknown, thisArg?: any): void;
|
|
16191
16238
|
|
|
@@ -16193,14 +16240,12 @@ export module '@theia/plugin' {
|
|
|
16193
16240
|
* Adds the test item to the children. If an item with the same ID already
|
|
16194
16241
|
* exists, it'll be replaced.
|
|
16195
16242
|
* @param item Item to add.
|
|
16196
|
-
* @stubbed
|
|
16197
16243
|
*/
|
|
16198
16244
|
add(item: TestItem): void;
|
|
16199
16245
|
|
|
16200
16246
|
/**
|
|
16201
16247
|
* Removes a single test item from the collection.
|
|
16202
16248
|
* @param itemId Item ID to delete.
|
|
16203
|
-
* @stubbed
|
|
16204
16249
|
*/
|
|
16205
16250
|
delete(itemId: string): void;
|
|
16206
16251
|
|
|
@@ -16208,7 +16253,6 @@ export module '@theia/plugin' {
|
|
|
16208
16253
|
* Efficiently gets a test item by ID, if it exists, in the children.
|
|
16209
16254
|
* @param itemId Item ID to get.
|
|
16210
16255
|
* @returns The found item or undefined if it does not exist.
|
|
16211
|
-
* @stubbed
|
|
16212
16256
|
*/
|
|
16213
16257
|
get(itemId: string): TestItem | undefined;
|
|
16214
16258
|
}
|
|
@@ -16225,20 +16269,17 @@ export module '@theia/plugin' {
|
|
|
16225
16269
|
* test results and tests in the document with those in the workspace
|
|
16226
16270
|
* (test explorer). This cannot change for the lifetime of the `TestItem`,
|
|
16227
16271
|
* and must be unique among its parent's direct children.
|
|
16228
|
-
* @stubbed
|
|
16229
16272
|
*/
|
|
16230
16273
|
readonly id: string;
|
|
16231
16274
|
|
|
16232
16275
|
/**
|
|
16233
16276
|
* URI this `TestItem` is associated with. May be a file or directory.
|
|
16234
|
-
* @stubbed
|
|
16235
16277
|
*/
|
|
16236
16278
|
readonly uri: Uri | undefined;
|
|
16237
16279
|
|
|
16238
16280
|
/**
|
|
16239
16281
|
* The children of this test item. For a test suite, this may contain the
|
|
16240
16282
|
* individual test cases or nested suites.
|
|
16241
|
-
* @stubbed
|
|
16242
16283
|
*/
|
|
16243
16284
|
readonly children: TestItemCollection;
|
|
16244
16285
|
|
|
@@ -16246,14 +16287,12 @@ export module '@theia/plugin' {
|
|
|
16246
16287
|
* The parent of this item. It's set automatically, and is undefined
|
|
16247
16288
|
* top-level items in the {@link TestController.items} and for items that
|
|
16248
16289
|
* aren't yet included in another item's {@link TestItem.children children}.
|
|
16249
|
-
* @stubbed
|
|
16250
16290
|
*/
|
|
16251
16291
|
readonly parent: TestItem | undefined;
|
|
16252
16292
|
|
|
16253
16293
|
/**
|
|
16254
16294
|
* Tags associated with this test item. May be used in combination with
|
|
16255
|
-
* {@link TestRunProfile.tags}, or simply as an organizational feature.
|
|
16256
|
-
* @stubbed
|
|
16295
|
+
* {@link TestRunProfile.tag tags}, or simply as an organizational feature.
|
|
16257
16296
|
*/
|
|
16258
16297
|
tags: readonly TestTag[];
|
|
16259
16298
|
|
|
@@ -16265,7 +16304,6 @@ export module '@theia/plugin' {
|
|
|
16265
16304
|
* to be invoked with the item.
|
|
16266
16305
|
*
|
|
16267
16306
|
* Default to `false`.
|
|
16268
|
-
* @stubbed
|
|
16269
16307
|
*/
|
|
16270
16308
|
canResolveChildren: boolean;
|
|
16271
16309
|
|
|
@@ -16274,19 +16312,16 @@ export module '@theia/plugin' {
|
|
|
16274
16312
|
* This is useful for showing status while discovering children.
|
|
16275
16313
|
*
|
|
16276
16314
|
* Defaults to `false`.
|
|
16277
|
-
* @stubbed
|
|
16278
16315
|
*/
|
|
16279
16316
|
busy: boolean;
|
|
16280
16317
|
|
|
16281
16318
|
/**
|
|
16282
16319
|
* Display name describing the test case.
|
|
16283
|
-
* @stubbed
|
|
16284
16320
|
*/
|
|
16285
16321
|
label: string;
|
|
16286
16322
|
|
|
16287
16323
|
/**
|
|
16288
16324
|
* Optional description that appears next to the label.
|
|
16289
|
-
* @stubbed
|
|
16290
16325
|
*/
|
|
16291
16326
|
description?: string;
|
|
16292
16327
|
|
|
@@ -16294,7 +16329,6 @@ export module '@theia/plugin' {
|
|
|
16294
16329
|
* A string that should be used when comparing this item
|
|
16295
16330
|
* with other items. When `falsy` the {@link TestItem.label label}
|
|
16296
16331
|
* is used.
|
|
16297
|
-
* @stubbed
|
|
16298
16332
|
*/
|
|
16299
16333
|
sortText?: string | undefined;
|
|
16300
16334
|
|
|
@@ -16302,7 +16336,6 @@ export module '@theia/plugin' {
|
|
|
16302
16336
|
* Location of the test item in its {@link TestItem.uri uri}.
|
|
16303
16337
|
*
|
|
16304
16338
|
* This is only meaningful if the `uri` points to a file.
|
|
16305
|
-
* @stubbed
|
|
16306
16339
|
*/
|
|
16307
16340
|
range: Range | undefined;
|
|
16308
16341
|
|
|
@@ -16311,7 +16344,6 @@ export module '@theia/plugin' {
|
|
|
16311
16344
|
*
|
|
16312
16345
|
* Note that this is not a test result and should only be used to represent errors in
|
|
16313
16346
|
* test discovery, such as syntax errors.
|
|
16314
|
-
* @stubbed
|
|
16315
16347
|
*/
|
|
16316
16348
|
error: string | MarkdownString | undefined;
|
|
16317
16349
|
}
|
|
@@ -16355,7 +16387,6 @@ export module '@theia/plugin' {
|
|
|
16355
16387
|
*/
|
|
16356
16388
|
constructor(message: string | MarkdownString);
|
|
16357
16389
|
}
|
|
16358
|
-
|
|
16359
16390
|
/**
|
|
16360
16391
|
* Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
|
|
16361
16392
|
* and others. This API makes no assumption about what promise library is being used which
|
|
@@ -16372,5 +16403,4 @@ export module '@theia/plugin' {
|
|
|
16372
16403
|
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
|
|
16373
16404
|
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
|
|
16374
16405
|
}
|
|
16375
|
-
|
|
16376
16406
|
}
|
|
@@ -59,24 +59,18 @@ export module '@theia/plugin' {
|
|
|
59
59
|
* An operation applied on paste
|
|
60
60
|
*/
|
|
61
61
|
class DocumentPasteEdit {
|
|
62
|
-
/**
|
|
63
|
-
* Identifies the type of edit.
|
|
64
|
-
*
|
|
65
|
-
* This id should be unique within the extension but does not need to be unique across extensions.
|
|
66
|
-
*/
|
|
67
|
-
id: string;
|
|
68
|
-
|
|
69
62
|
/**
|
|
70
63
|
* Human readable label that describes the edit.
|
|
71
64
|
*/
|
|
72
65
|
label: string;
|
|
73
66
|
|
|
74
67
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* Defaults to `0`.
|
|
68
|
+
* Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
|
|
78
69
|
*/
|
|
79
|
-
|
|
70
|
+
yieldTo?: ReadonlyArray<
|
|
71
|
+
| { readonly extensionId: string; readonly providerId: string }
|
|
72
|
+
| { readonly mimeType: string }
|
|
73
|
+
>;
|
|
80
74
|
|
|
81
75
|
/**
|
|
82
76
|
* The text or snippet to insert at the pasted locations.
|
|
@@ -97,6 +91,15 @@ export module '@theia/plugin' {
|
|
|
97
91
|
}
|
|
98
92
|
|
|
99
93
|
interface DocumentPasteProviderMetadata {
|
|
94
|
+
/**
|
|
95
|
+
* Identifies the provider.
|
|
96
|
+
*
|
|
97
|
+
* This id is used when users configure the default provider for paste.
|
|
98
|
+
*
|
|
99
|
+
* This id should be unique within the extension but does not need to be unique across extensions.
|
|
100
|
+
*/
|
|
101
|
+
readonly id: string;
|
|
102
|
+
|
|
100
103
|
/**
|
|
101
104
|
* Mime types that {@link DocumentPasteEditProvider.prepareDocumentPaste provideDocumentPasteEdits} may add on copy.
|
|
102
105
|
*/
|
|
@@ -25,27 +25,36 @@ export module '@theia/plugin' {
|
|
|
25
25
|
// https://github.com/microsoft/vscode/issues/179430
|
|
26
26
|
|
|
27
27
|
export interface DocumentDropEdit {
|
|
28
|
+
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* This id should be unique within the extension but does not need to be unique across extensions.
|
|
30
|
+
* Human readable label that describes the edit.
|
|
32
31
|
*/
|
|
33
|
-
|
|
32
|
+
label?: string;
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
|
-
* The
|
|
37
|
-
*
|
|
38
|
-
* Defaults to `0`.
|
|
35
|
+
* The mime type from the {@link DataTransfer} that this edit applies.
|
|
39
36
|
*/
|
|
40
|
-
|
|
37
|
+
handledMimeType?: string;
|
|
41
38
|
|
|
42
39
|
/**
|
|
43
|
-
*
|
|
40
|
+
* Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
|
|
44
41
|
*/
|
|
45
|
-
|
|
42
|
+
yieldTo?: ReadonlyArray<
|
|
43
|
+
| { readonly extensionId: string; readonly providerId: string }
|
|
44
|
+
| { readonly mimeType: string }
|
|
45
|
+
>;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
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
|
+
|
|
49
58
|
/**
|
|
50
59
|
* List of data transfer types that the provider supports.
|
|
51
60
|
*
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
|
|
23
23
|
export module '@theia/plugin' {
|
|
24
24
|
|
|
25
|
+
export type SingleOrMany<T> = T[] | T;
|
|
26
|
+
|
|
25
27
|
export namespace window {
|
|
26
28
|
/**
|
|
27
29
|
* @param provider A terminal quick fix provider
|
|
@@ -37,7 +39,8 @@ export module '@theia/plugin' {
|
|
|
37
39
|
* @param token A cancellation token indicating the result is no longer needed
|
|
38
40
|
* @return Terminal quick fix(es) if any
|
|
39
41
|
*/
|
|
40
|
-
provideTerminalQuickFixes(commandMatchResult: TerminalCommandMatchResult, token: CancellationToken):
|
|
42
|
+
provideTerminalQuickFixes(commandMatchResult: TerminalCommandMatchResult, token: CancellationToken):
|
|
43
|
+
ProviderResult<SingleOrMany<TerminalQuickFixExecuteTerminalCommand | TerminalQuickFixOpener | Command>>;
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
export interface TerminalCommandMatchResult {
|
|
@@ -49,13 +52,19 @@ export module '@theia/plugin' {
|
|
|
49
52
|
};
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
export class TerminalQuickFixExecuteTerminalCommand {
|
|
56
|
+
/**
|
|
57
|
+
* The terminal command to run
|
|
58
|
+
*/
|
|
59
|
+
terminalCommand: string;
|
|
60
|
+
constructor(terminalCommand: string);
|
|
54
61
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
export class TerminalQuickFixOpener {
|
|
63
|
+
/**
|
|
64
|
+
* The uri to open
|
|
65
|
+
*/
|
|
66
|
+
uri: Uri;
|
|
67
|
+
constructor(uri: Uri);
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
/**
|