@theia/plugin 1.40.1 → 1.42.0
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/src/theia.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ import './theia.proposed.dropMetadata';
|
|
|
30
30
|
import './theia.proposed.editSessionIdentityProvider';
|
|
31
31
|
import './theia.proposed.extensionsAny';
|
|
32
32
|
import './theia.proposed.externalUriOpener';
|
|
33
|
+
import './theia.proposed.notebookCellExecutionState';
|
|
34
|
+
import './theia.proposed.notebookKernelSource';
|
|
35
|
+
import './theia.proposed.notebookMessaging';
|
|
33
36
|
import './theia.proposed.findTextInFiles';
|
|
34
37
|
import './theia.proposed.fsChunks';
|
|
35
38
|
import './theia.proposed.profileContentHandlers';
|
|
@@ -2137,6 +2140,11 @@ export module '@theia/plugin' {
|
|
|
2137
2140
|
*/
|
|
2138
2141
|
kind?: QuickPickItemKind;
|
|
2139
2142
|
|
|
2143
|
+
/**
|
|
2144
|
+
* The icon path or {@link ThemeIcon} for the QuickPickItem.
|
|
2145
|
+
*/
|
|
2146
|
+
iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
|
|
2147
|
+
|
|
2140
2148
|
/**
|
|
2141
2149
|
* A human-readable string which is rendered less prominent in the same line. Supports rendering of
|
|
2142
2150
|
* {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
|
|
@@ -3585,6 +3593,12 @@ export module '@theia/plugin' {
|
|
|
3585
3593
|
* A collection of mutations that an extension can apply to a process environment.
|
|
3586
3594
|
*/
|
|
3587
3595
|
export interface EnvironmentVariableCollection {
|
|
3596
|
+
|
|
3597
|
+
/**
|
|
3598
|
+
* A description for the environment variable collection, this will be used to describe the changes in the UI.
|
|
3599
|
+
*/
|
|
3600
|
+
description: string | MarkdownString | undefined;
|
|
3601
|
+
|
|
3588
3602
|
/**
|
|
3589
3603
|
* Whether the collection should be cached for the workspace and applied to the terminal
|
|
3590
3604
|
* across window reloads. When true the collection will be active immediately such when the
|
|
@@ -4941,14 +4955,12 @@ export module '@theia/plugin' {
|
|
|
4941
4955
|
|
|
4942
4956
|
/**
|
|
4943
4957
|
* The currently visible {@link NotebookEditor notebook editors} or an empty array.
|
|
4944
|
-
* @stubbed
|
|
4945
4958
|
*/
|
|
4946
4959
|
export const visibleNotebookEditors: readonly NotebookEditor[];
|
|
4947
4960
|
|
|
4948
4961
|
/**
|
|
4949
4962
|
* An {@link Event} which fires when the {@link window.visibleNotebookEditors visible notebook editors}
|
|
4950
4963
|
* has changed.
|
|
4951
|
-
* @stubbed
|
|
4952
4964
|
*/
|
|
4953
4965
|
export const onDidChangeVisibleNotebookEditors: Event<readonly NotebookEditor[]>;
|
|
4954
4966
|
|
|
@@ -4956,7 +4968,6 @@ export module '@theia/plugin' {
|
|
|
4956
4968
|
* The currently active {@link NotebookEditor notebook editor} or `undefined`. The active editor is the one
|
|
4957
4969
|
* that currently has focus or, when none has focus, the one that has changed
|
|
4958
4970
|
* input most recently.
|
|
4959
|
-
* @stubbed
|
|
4960
4971
|
*/
|
|
4961
4972
|
export const activeNotebookEditor: NotebookEditor | undefined;
|
|
4962
4973
|
|
|
@@ -4964,21 +4975,18 @@ export module '@theia/plugin' {
|
|
|
4964
4975
|
* An {@link Event} which fires when the {@link window.activeNotebookEditor active notebook editor}
|
|
4965
4976
|
* has changed. *Note* that the event also fires when the active editor changes
|
|
4966
4977
|
* to `undefined`.
|
|
4967
|
-
* @stubbed
|
|
4968
4978
|
*/
|
|
4969
4979
|
export const onDidChangeActiveNotebookEditor: Event<NotebookEditor | undefined>;
|
|
4970
4980
|
|
|
4971
4981
|
/**
|
|
4972
4982
|
* An {@link Event} which fires when the {@link NotebookEditor.selections notebook editor selections}
|
|
4973
4983
|
* have changed.
|
|
4974
|
-
* @stubbed
|
|
4975
4984
|
*/
|
|
4976
4985
|
export const onDidChangeNotebookEditorSelection: Event<NotebookEditorSelectionChangeEvent>;
|
|
4977
4986
|
|
|
4978
4987
|
/**
|
|
4979
4988
|
* An {@link Event} which fires when the {@link NotebookEditor.visibleRanges notebook editor visible ranges}
|
|
4980
4989
|
* have changed.
|
|
4981
|
-
* @stubbed
|
|
4982
4990
|
*/
|
|
4983
4991
|
export const onDidChangeNotebookEditorVisibleRanges: Event<NotebookEditorVisibleRangesChangeEvent>;
|
|
4984
4992
|
|
|
@@ -4989,7 +4997,6 @@ export module '@theia/plugin' {
|
|
|
4989
4997
|
* @param options {@link NotebookDocumentShowOptions Editor options} to configure the behavior of showing the {@link NotebookEditor notebook editor}.
|
|
4990
4998
|
*
|
|
4991
4999
|
* @return A promise that resolves to an {@link NotebookEditor notebook editor}.
|
|
4992
|
-
* @stubbed
|
|
4993
5000
|
*/
|
|
4994
5001
|
export function showNotebookDocument(document: NotebookDocument, options?: NotebookDocumentShowOptions): Thenable<NotebookEditor>;
|
|
4995
5002
|
|
|
@@ -5944,6 +5951,44 @@ export module '@theia/plugin' {
|
|
|
5944
5951
|
* array containing all selected tree items.
|
|
5945
5952
|
*/
|
|
5946
5953
|
canSelectMany?: boolean;
|
|
5954
|
+
|
|
5955
|
+
/**
|
|
5956
|
+
* By default, when the children of a tree item have already been fetched, child checkboxes are automatically managed based on the checked state of the parent tree item.
|
|
5957
|
+
* If the tree item is collapsed by default (meaning that the children haven't yet been fetched) then child checkboxes will not be updated.
|
|
5958
|
+
* To override this behavior and manage child and parent checkbox state in the extension, set this to `true`.
|
|
5959
|
+
*
|
|
5960
|
+
* Examples where {@link TreeViewOptions.manageCheckboxStateManually} is false, the default behavior:
|
|
5961
|
+
*
|
|
5962
|
+
* 1. A tree item is checked, then its children are fetched. The children will be checked.
|
|
5963
|
+
*
|
|
5964
|
+
* 2. A tree item's parent is checked. The tree item and all of it's siblings will be checked.
|
|
5965
|
+
* - [ ] Parent
|
|
5966
|
+
* - [ ] Child 1
|
|
5967
|
+
* - [ ] Child 2
|
|
5968
|
+
* When the user checks Parent, the tree will look like this:
|
|
5969
|
+
* - [x] Parent
|
|
5970
|
+
* - [x] Child 1
|
|
5971
|
+
* - [x] Child 2
|
|
5972
|
+
*
|
|
5973
|
+
* 3. A tree item and all of it's siblings are checked. The parent will be checked.
|
|
5974
|
+
* - [ ] Parent
|
|
5975
|
+
* - [ ] Child 1
|
|
5976
|
+
* - [ ] Child 2
|
|
5977
|
+
* When the user checks Child 1 and Child 2, the tree will look like this:
|
|
5978
|
+
* - [x] Parent
|
|
5979
|
+
* - [x] Child 1
|
|
5980
|
+
* - [x] Child 2
|
|
5981
|
+
*
|
|
5982
|
+
* 4. A tree item is unchecked. The parent will be unchecked.
|
|
5983
|
+
* - [x] Parent
|
|
5984
|
+
* - [x] Child 1
|
|
5985
|
+
* - [x] Child 2
|
|
5986
|
+
* When the user unchecks Child 1, the tree will look like this:
|
|
5987
|
+
* - [ ] Parent
|
|
5988
|
+
* - [ ] Child 1
|
|
5989
|
+
* - [x] Child 2
|
|
5990
|
+
*/
|
|
5991
|
+
manageCheckboxStateManually?: boolean;
|
|
5947
5992
|
}
|
|
5948
5993
|
|
|
5949
5994
|
/**
|
|
@@ -6157,6 +6202,16 @@ export module '@theia/plugin' {
|
|
|
6157
6202
|
readonly value: number;
|
|
6158
6203
|
}
|
|
6159
6204
|
|
|
6205
|
+
/**
|
|
6206
|
+
* An event describing the change in a tree item's checkbox state.
|
|
6207
|
+
*/
|
|
6208
|
+
export interface TreeCheckboxChangeEvent<T> {
|
|
6209
|
+
/**
|
|
6210
|
+
* The items that were checked or unchecked.
|
|
6211
|
+
*/
|
|
6212
|
+
readonly items: ReadonlyArray<[T, TreeItemCheckboxState]>;
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6160
6215
|
/**
|
|
6161
6216
|
* Represents a Tree view
|
|
6162
6217
|
*/
|
|
@@ -6192,6 +6247,11 @@ export module '@theia/plugin' {
|
|
|
6192
6247
|
*/
|
|
6193
6248
|
readonly onDidChangeVisibility: Event<TreeViewVisibilityChangeEvent>;
|
|
6194
6249
|
|
|
6250
|
+
/**
|
|
6251
|
+
* An event to signal that an element or root has either been checked or unchecked.
|
|
6252
|
+
*/
|
|
6253
|
+
readonly onDidChangeCheckboxState: Event<TreeCheckboxChangeEvent<T>>;
|
|
6254
|
+
|
|
6195
6255
|
/**
|
|
6196
6256
|
* An optional human-readable message that will be rendered in the view.
|
|
6197
6257
|
* Setting the message to null, undefined, or empty string will remove the message from the view.
|
|
@@ -6364,6 +6424,12 @@ export module '@theia/plugin' {
|
|
|
6364
6424
|
*/
|
|
6365
6425
|
accessibilityInformation?: AccessibilityInformation;
|
|
6366
6426
|
|
|
6427
|
+
/**
|
|
6428
|
+
* {@link TreeItemCheckboxState TreeItemCheckboxState} of the tree item.
|
|
6429
|
+
* {@link TreeDataProvider.onDidChangeTreeData onDidChangeTreeData} should be fired when {@link TreeItem.checkboxState checkboxState} changes.
|
|
6430
|
+
*/
|
|
6431
|
+
checkboxState?: TreeItemCheckboxState | { readonly state: TreeItemCheckboxState; readonly tooltip?: string; readonly accessibilityInformation?: AccessibilityInformation };
|
|
6432
|
+
|
|
6367
6433
|
/**
|
|
6368
6434
|
* @param label A human-readable string describing this item
|
|
6369
6435
|
* @param collapsibleState {@link TreeItemCollapsibleState TreeItemCollapsibleState} of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None)
|
|
@@ -6412,6 +6478,20 @@ export module '@theia/plugin' {
|
|
|
6412
6478
|
highlights?: [number, number][];
|
|
6413
6479
|
}
|
|
6414
6480
|
|
|
6481
|
+
/**
|
|
6482
|
+
* Checkbox state of the tree item
|
|
6483
|
+
*/
|
|
6484
|
+
export enum TreeItemCheckboxState {
|
|
6485
|
+
/**
|
|
6486
|
+
* Determines an item is unchecked
|
|
6487
|
+
*/
|
|
6488
|
+
Unchecked = 0,
|
|
6489
|
+
/**
|
|
6490
|
+
* Determines an item is checked
|
|
6491
|
+
*/
|
|
6492
|
+
Checked = 1
|
|
6493
|
+
}
|
|
6494
|
+
|
|
6415
6495
|
/**
|
|
6416
6496
|
* Represents the configuration. It is a merged view of
|
|
6417
6497
|
*
|
|
@@ -7079,7 +7159,6 @@ export module '@theia/plugin' {
|
|
|
7079
7159
|
* All notebook documents currently known to the editor.
|
|
7080
7160
|
*
|
|
7081
7161
|
* @readonly
|
|
7082
|
-
* @stubbed
|
|
7083
7162
|
*/
|
|
7084
7163
|
export let notebookDocuments: readonly NotebookDocument[];
|
|
7085
7164
|
|
|
@@ -7096,7 +7175,6 @@ export module '@theia/plugin' {
|
|
|
7096
7175
|
|
|
7097
7176
|
/**
|
|
7098
7177
|
* An event that is emitted when a {@link NotebookDocument notebook} is opened.
|
|
7099
|
-
* @stubbed
|
|
7100
7178
|
*/
|
|
7101
7179
|
export const onDidOpenNotebookDocument: Event<NotebookDocument>;
|
|
7102
7180
|
|
|
@@ -7106,13 +7184,11 @@ export module '@theia/plugin' {
|
|
|
7106
7184
|
* Note 1: There is no guarantee that this event fires when an editor tab is closed.
|
|
7107
7185
|
*
|
|
7108
7186
|
* Note 2: A notebook can be open but not shown in an editor which means this event can fire for a notebook that has not been shown in an editor.
|
|
7109
|
-
* @stubbed
|
|
7110
7187
|
*/
|
|
7111
7188
|
export const onDidCloseNotebookDocument: Event<NotebookDocument>;
|
|
7112
7189
|
|
|
7113
7190
|
/**
|
|
7114
7191
|
* An event that is emitted when a {@link NotebookDocument notebook} is saved.
|
|
7115
|
-
* @stubbed
|
|
7116
7192
|
*/
|
|
7117
7193
|
export const onDidSaveNotebookDocument: Event<NotebookDocument>;
|
|
7118
7194
|
|
|
@@ -7124,7 +7200,6 @@ export module '@theia/plugin' {
|
|
|
7124
7200
|
* @param serializer a notebook serializer.
|
|
7125
7201
|
* @param options Optional context options that define what parts of a notebook should be persisted
|
|
7126
7202
|
* @return A {@link Disposable disposable} that unregisters this serializer when being disposed.
|
|
7127
|
-
* @stubbed
|
|
7128
7203
|
*/
|
|
7129
7204
|
export function registerNotebookSerializer(notebookType: string, serializer: NotebookSerializer, options?: NotebookDocumentContentOptions): Disposable;
|
|
7130
7205
|
|
|
@@ -7178,7 +7253,6 @@ export module '@theia/plugin' {
|
|
|
7178
7253
|
|
|
7179
7254
|
/**
|
|
7180
7255
|
* An event that is emitted when a {@link Notebook notebook} has changed.
|
|
7181
|
-
* @stubbed
|
|
7182
7256
|
*/
|
|
7183
7257
|
export const onDidChangeNotebookDocument: Event<NotebookDocumentChangeEvent>;
|
|
7184
7258
|
|
|
@@ -7317,7 +7391,6 @@ export module '@theia/plugin' {
|
|
|
7317
7391
|
*
|
|
7318
7392
|
* @param uri The resource to open.
|
|
7319
7393
|
* @return A promise that resolves to a {@link NotebookDocument notebook}.
|
|
7320
|
-
* @stubbed
|
|
7321
7394
|
*/
|
|
7322
7395
|
export function openNotebookDocument(uri: Uri): Thenable<NotebookDocument> | undefined;
|
|
7323
7396
|
|
|
@@ -7327,7 +7400,6 @@ export module '@theia/plugin' {
|
|
|
7327
7400
|
* @param notebookType The notebook type that should be used.
|
|
7328
7401
|
* @param content The initial contents of the notebook.
|
|
7329
7402
|
* @return A promise that resolves to a {@link NotebookDocument notebook}.
|
|
7330
|
-
* @stubbed
|
|
7331
7403
|
*/
|
|
7332
7404
|
export function openNotebookDocument(notebookType: string, content?: NotebookData): Thenable<NotebookDocument> | undefined;
|
|
7333
7405
|
|
|
@@ -10051,6 +10123,30 @@ export module '@theia/plugin' {
|
|
|
10051
10123
|
*/
|
|
10052
10124
|
set(uri: Uri, edits: ReadonlyArray<[TextEdit | SnippetTextEdit, WorkspaceEditEntryMetadata]>): void;
|
|
10053
10125
|
|
|
10126
|
+
/**
|
|
10127
|
+
* Set (and replace) text edits or snippet edits with metadata for a resource.
|
|
10128
|
+
*
|
|
10129
|
+
* @param uri A resource identifier.
|
|
10130
|
+
* @param edits An array of edits.
|
|
10131
|
+
*/
|
|
10132
|
+
set(uri: Uri, edits: ReadonlyArray<[TextEdit | SnippetTextEdit, WorkspaceEditEntryMetadata]>): void;
|
|
10133
|
+
|
|
10134
|
+
/**
|
|
10135
|
+
* Set (and replace) notebook edits for a resource.
|
|
10136
|
+
*
|
|
10137
|
+
* @param uri A resource identifier.
|
|
10138
|
+
* @param edits An array of edits.
|
|
10139
|
+
*/
|
|
10140
|
+
set(uri: Uri, edits: readonly NotebookEdit[]): void;
|
|
10141
|
+
|
|
10142
|
+
/**
|
|
10143
|
+
* Set (and replace) notebook edits with metadata for a resource.
|
|
10144
|
+
*
|
|
10145
|
+
* @param uri A resource identifier.
|
|
10146
|
+
* @param edits An array of edits.
|
|
10147
|
+
*/
|
|
10148
|
+
set(uri: Uri, edits: ReadonlyArray<[NotebookEdit, WorkspaceEditEntryMetadata]>): void;
|
|
10149
|
+
|
|
10054
10150
|
/**
|
|
10055
10151
|
* Get the text edits for a resource.
|
|
10056
10152
|
*
|
|
@@ -14438,13 +14534,11 @@ export module '@theia/plugin' {
|
|
|
14438
14534
|
|
|
14439
14535
|
/**
|
|
14440
14536
|
* The {@link NotebookDocument notebook document} associated with this notebook editor.
|
|
14441
|
-
* @stubbed
|
|
14442
14537
|
*/
|
|
14443
14538
|
readonly notebook: NotebookDocument;
|
|
14444
14539
|
|
|
14445
14540
|
/**
|
|
14446
14541
|
* The primary selection in this notebook editor.
|
|
14447
|
-
* @stubbed
|
|
14448
14542
|
*/
|
|
14449
14543
|
selection: NotebookRange;
|
|
14450
14544
|
|
|
@@ -14452,19 +14546,16 @@ export module '@theia/plugin' {
|
|
|
14452
14546
|
* All selections in this notebook editor.
|
|
14453
14547
|
*
|
|
14454
14548
|
* The primary selection (or focused range) is `selections[0]`. When the document has no cells, the primary selection is empty `{ start: 0, end: 0 }`;
|
|
14455
|
-
* @stubbed
|
|
14456
14549
|
*/
|
|
14457
14550
|
selections: readonly NotebookRange[];
|
|
14458
14551
|
|
|
14459
14552
|
/**
|
|
14460
14553
|
* The current visible ranges in the editor (vertically).
|
|
14461
|
-
* @stubbed
|
|
14462
14554
|
*/
|
|
14463
14555
|
readonly visibleRanges: readonly NotebookRange[];
|
|
14464
14556
|
|
|
14465
14557
|
/**
|
|
14466
14558
|
* The column in which this editor shows.
|
|
14467
|
-
* @stubbed
|
|
14468
14559
|
*/
|
|
14469
14560
|
readonly viewColumn?: ViewColumn;
|
|
14470
14561
|
|
|
@@ -14484,7 +14575,6 @@ export module '@theia/plugin' {
|
|
|
14484
14575
|
export interface NotebookRendererMessaging {
|
|
14485
14576
|
/**
|
|
14486
14577
|
* An event that fires when a message is received from a renderer.
|
|
14487
|
-
* @stubbed
|
|
14488
14578
|
*/
|
|
14489
14579
|
readonly onDidReceiveMessage: Event<{
|
|
14490
14580
|
readonly editor: NotebookEditor;
|
|
@@ -14499,7 +14589,6 @@ export module '@theia/plugin' {
|
|
|
14499
14589
|
* message is sent to all renderers.
|
|
14500
14590
|
* @returns a boolean indicating whether the message was successfully
|
|
14501
14591
|
* delivered to any renderer.
|
|
14502
|
-
* @stubbed
|
|
14503
14592
|
*/
|
|
14504
14593
|
postMessage(message: any, editor?: NotebookEditor): Thenable<boolean>;
|
|
14505
14594
|
}
|
|
@@ -14533,7 +14622,6 @@ export module '@theia/plugin' {
|
|
|
14533
14622
|
* The index of this cell in its {@link NotebookDocument.cellAt containing notebook}. The
|
|
14534
14623
|
* index is updated when a cell is moved within its notebook. The index is `-1`
|
|
14535
14624
|
* when the cell has been removed from its notebook.
|
|
14536
|
-
* @stubbed
|
|
14537
14625
|
*/
|
|
14538
14626
|
readonly index: number;
|
|
14539
14627
|
|
|
@@ -14544,31 +14632,26 @@ export module '@theia/plugin' {
|
|
|
14544
14632
|
|
|
14545
14633
|
/**
|
|
14546
14634
|
* The kind of this cell.
|
|
14547
|
-
* @stubbed
|
|
14548
14635
|
*/
|
|
14549
14636
|
readonly kind: NotebookCellKind;
|
|
14550
14637
|
|
|
14551
14638
|
/**
|
|
14552
14639
|
* The {@link TextDocument text} of this cell, represented as text document.
|
|
14553
|
-
* @stubbed
|
|
14554
14640
|
*/
|
|
14555
14641
|
readonly document: TextDocument;
|
|
14556
14642
|
|
|
14557
14643
|
/**
|
|
14558
14644
|
* The metadata of this cell. Can be anything but must be JSON-stringifyable.
|
|
14559
|
-
* @stubbed
|
|
14560
14645
|
*/
|
|
14561
14646
|
readonly metadata: { readonly [key: string]: any };
|
|
14562
14647
|
|
|
14563
14648
|
/**
|
|
14564
14649
|
* The outputs of this cell.
|
|
14565
|
-
* @stubbed
|
|
14566
14650
|
*/
|
|
14567
14651
|
readonly outputs: readonly NotebookCellOutput[];
|
|
14568
14652
|
|
|
14569
14653
|
/**
|
|
14570
14654
|
* The most recent {@link NotebookCellExecutionSummary execution summary} for this cell.
|
|
14571
|
-
* @stubbed
|
|
14572
14655
|
*/
|
|
14573
14656
|
readonly executionSummary: NotebookCellExecutionSummary | undefined;
|
|
14574
14657
|
}
|
|
@@ -14584,7 +14667,6 @@ export module '@theia/plugin' {
|
|
|
14584
14667
|
*
|
|
14585
14668
|
* *Note* that most notebooks use the `file`-scheme, which means they are files on disk. However, **not** all notebooks are
|
|
14586
14669
|
* saved on disk and therefore the `scheme` must be checked before trying to access the underlying file or siblings on disk.
|
|
14587
|
-
* @stubbed
|
|
14588
14670
|
*
|
|
14589
14671
|
* @see {@link FileSystemProvider}
|
|
14590
14672
|
*/
|
|
@@ -14592,7 +14674,6 @@ export module '@theia/plugin' {
|
|
|
14592
14674
|
|
|
14593
14675
|
/**
|
|
14594
14676
|
* The type of notebook.
|
|
14595
|
-
* @stubbed
|
|
14596
14677
|
*/
|
|
14597
14678
|
readonly notebookType: string;
|
|
14598
14679
|
|
|
@@ -14620,13 +14701,11 @@ export module '@theia/plugin' {
|
|
|
14620
14701
|
|
|
14621
14702
|
/**
|
|
14622
14703
|
* Arbitrary metadata for this notebook. Can be anything but must be JSON-stringifyable.
|
|
14623
|
-
* @stubbed
|
|
14624
14704
|
*/
|
|
14625
14705
|
readonly metadata: { [key: string]: any };
|
|
14626
14706
|
|
|
14627
14707
|
/**
|
|
14628
14708
|
* The number of cells in the notebook.
|
|
14629
|
-
* @stubbed
|
|
14630
14709
|
*/
|
|
14631
14710
|
readonly cellCount: number;
|
|
14632
14711
|
|
|
@@ -14635,7 +14714,6 @@ export module '@theia/plugin' {
|
|
|
14635
14714
|
*
|
|
14636
14715
|
* @param index - The index of the cell to retrieve.
|
|
14637
14716
|
* @return A {@link NotebookCell cell}.
|
|
14638
|
-
* @stubbed
|
|
14639
14717
|
*/
|
|
14640
14718
|
cellAt(index: number): NotebookCell;
|
|
14641
14719
|
|
|
@@ -14645,7 +14723,6 @@ export module '@theia/plugin' {
|
|
|
14645
14723
|
*
|
|
14646
14724
|
* @param range A notebook range.
|
|
14647
14725
|
* @returns The cells contained by the range or all cells.
|
|
14648
|
-
* @stubbed
|
|
14649
14726
|
*/
|
|
14650
14727
|
getCells(range?: NotebookRange): NotebookCell[];
|
|
14651
14728
|
|
|
@@ -14654,7 +14731,6 @@ export module '@theia/plugin' {
|
|
|
14654
14731
|
*
|
|
14655
14732
|
* @return A promise that will resolve to true when the document
|
|
14656
14733
|
* has been saved. Will return false if the file was not dirty or when save failed.
|
|
14657
|
-
* @stubbed
|
|
14658
14734
|
*/
|
|
14659
14735
|
save(): Thenable<boolean>;
|
|
14660
14736
|
}
|
|
@@ -14668,7 +14744,6 @@ export module '@theia/plugin' {
|
|
|
14668
14744
|
|
|
14669
14745
|
/**
|
|
14670
14746
|
* The affected cell.
|
|
14671
|
-
* @stubbed
|
|
14672
14747
|
*/
|
|
14673
14748
|
readonly cell: NotebookCell;
|
|
14674
14749
|
|
|
@@ -14677,25 +14752,21 @@ export module '@theia/plugin' {
|
|
|
14677
14752
|
*
|
|
14678
14753
|
* *Note* that you should use the {@link workspace.onDidChangeTextDocument onDidChangeTextDocument}-event
|
|
14679
14754
|
* for detailed change information, like what edits have been performed.
|
|
14680
|
-
* @stubbed
|
|
14681
14755
|
*/
|
|
14682
14756
|
readonly document: TextDocument | undefined;
|
|
14683
14757
|
|
|
14684
14758
|
/**
|
|
14685
14759
|
* The new metadata of the cell or `undefined` when it did not change.
|
|
14686
|
-
* @stubbed
|
|
14687
14760
|
*/
|
|
14688
14761
|
readonly metadata: { [key: string]: any } | undefined;
|
|
14689
14762
|
|
|
14690
14763
|
/**
|
|
14691
14764
|
* The new outputs of the cell or `undefined` when they did not change.
|
|
14692
|
-
* @stubbed
|
|
14693
14765
|
*/
|
|
14694
14766
|
readonly outputs: readonly NotebookCellOutput[] | undefined;
|
|
14695
14767
|
|
|
14696
14768
|
/**
|
|
14697
14769
|
* The new execution summary of the cell or `undefined` when it did not change.
|
|
14698
|
-
* @stubbed
|
|
14699
14770
|
*/
|
|
14700
14771
|
readonly executionSummary: NotebookCellExecutionSummary | undefined;
|
|
14701
14772
|
}
|
|
@@ -14712,19 +14783,16 @@ export module '@theia/plugin' {
|
|
|
14712
14783
|
*
|
|
14713
14784
|
* Note that no cells have been {@link NotebookDocumentContentChange.removedCells removed}
|
|
14714
14785
|
* when this range is {@link NotebookRange.isEmpty empty}.
|
|
14715
|
-
* @stubbed
|
|
14716
14786
|
*/
|
|
14717
14787
|
readonly range: NotebookRange;
|
|
14718
14788
|
|
|
14719
14789
|
/**
|
|
14720
14790
|
* Cells that have been added to the document.
|
|
14721
|
-
* @stubbed
|
|
14722
14791
|
*/
|
|
14723
14792
|
readonly addedCells: readonly NotebookCell[];
|
|
14724
14793
|
|
|
14725
14794
|
/**
|
|
14726
14795
|
* Cells that have been removed from the document.
|
|
14727
|
-
* @stubbed
|
|
14728
14796
|
*/
|
|
14729
14797
|
readonly removedCells: readonly NotebookCell[];
|
|
14730
14798
|
}
|
|
@@ -14736,25 +14804,21 @@ export module '@theia/plugin' {
|
|
|
14736
14804
|
|
|
14737
14805
|
/**
|
|
14738
14806
|
* The affected notebook.
|
|
14739
|
-
* @stubbed
|
|
14740
14807
|
*/
|
|
14741
14808
|
readonly notebook: NotebookDocument;
|
|
14742
14809
|
|
|
14743
14810
|
/**
|
|
14744
14811
|
* The new metadata of the notebook or `undefined` when it did not change.
|
|
14745
|
-
* @stubbed
|
|
14746
14812
|
*/
|
|
14747
14813
|
readonly metadata: { [key: string]: any } | undefined;
|
|
14748
14814
|
|
|
14749
14815
|
/**
|
|
14750
14816
|
* An array of content changes describing added or removed {@link NotebookCell cells}.
|
|
14751
|
-
* @stubbed
|
|
14752
14817
|
*/
|
|
14753
14818
|
readonly contentChanges: readonly NotebookDocumentContentChange[];
|
|
14754
14819
|
|
|
14755
14820
|
/**
|
|
14756
14821
|
* An array of {@link NotebookDocumentCellChange cell changes}.
|
|
14757
|
-
* @stubbed
|
|
14758
14822
|
*/
|
|
14759
14823
|
readonly cellChanges: readonly NotebookDocumentCellChange[];
|
|
14760
14824
|
}
|
|
@@ -14769,7 +14833,6 @@ export module '@theia/plugin' {
|
|
|
14769
14833
|
export interface NotebookDocumentWillSaveEvent {
|
|
14770
14834
|
/**
|
|
14771
14835
|
* A cancellation token.
|
|
14772
|
-
* @stubbed
|
|
14773
14836
|
*/
|
|
14774
14837
|
readonly token: CancellationToken;
|
|
14775
14838
|
|
|
@@ -14826,19 +14889,16 @@ export module '@theia/plugin' {
|
|
|
14826
14889
|
|
|
14827
14890
|
/**
|
|
14828
14891
|
* The order in which the execution happened.
|
|
14829
|
-
* @stubbed
|
|
14830
14892
|
*/
|
|
14831
14893
|
readonly executionOrder?: number;
|
|
14832
14894
|
|
|
14833
14895
|
/**
|
|
14834
14896
|
* If the execution finished successfully.
|
|
14835
|
-
* @stubbed
|
|
14836
14897
|
*/
|
|
14837
14898
|
readonly success?: boolean;
|
|
14838
14899
|
|
|
14839
14900
|
/**
|
|
14840
14901
|
* The times at which execution started and ended, as unix timestamps
|
|
14841
|
-
* @stubbed
|
|
14842
14902
|
*/
|
|
14843
14903
|
readonly timing?: { readonly startTime: number; readonly endTime: number };
|
|
14844
14904
|
}
|
|
@@ -14851,19 +14911,16 @@ export module '@theia/plugin' {
|
|
|
14851
14911
|
|
|
14852
14912
|
/**
|
|
14853
14913
|
* The zero-based start index of this range.
|
|
14854
|
-
* @stubbed
|
|
14855
14914
|
*/
|
|
14856
14915
|
readonly start: number;
|
|
14857
14916
|
|
|
14858
14917
|
/**
|
|
14859
14918
|
* The exclusive end index of this range (zero-based).
|
|
14860
|
-
* @stubbed
|
|
14861
14919
|
*/
|
|
14862
14920
|
readonly end: number;
|
|
14863
14921
|
|
|
14864
14922
|
/**
|
|
14865
14923
|
* `true` if `start` and `end` are equal.
|
|
14866
|
-
* @stubbed
|
|
14867
14924
|
*/
|
|
14868
14925
|
readonly isEmpty: boolean;
|
|
14869
14926
|
|
|
@@ -14873,7 +14930,6 @@ export module '@theia/plugin' {
|
|
|
14873
14930
|
*
|
|
14874
14931
|
* @param start start index
|
|
14875
14932
|
* @param end end index.
|
|
14876
|
-
* @stubbed
|
|
14877
14933
|
*/
|
|
14878
14934
|
constructor(start: number, end: number);
|
|
14879
14935
|
|
|
@@ -14883,7 +14939,6 @@ export module '@theia/plugin' {
|
|
|
14883
14939
|
* @param change An object that describes a change to this range.
|
|
14884
14940
|
* @return A range that reflects the given change. Will return `this` range if the change
|
|
14885
14941
|
* is not changing anything.
|
|
14886
|
-
* @stubbed
|
|
14887
14942
|
*/
|
|
14888
14943
|
with(change: { start?: number; end?: number }): NotebookRange;
|
|
14889
14944
|
}
|
|
@@ -14987,13 +15042,11 @@ export module '@theia/plugin' {
|
|
|
14987
15042
|
* vscode.NotebookCellOutputItem.text('Hey', 'text/plain'), // INVALID: repeated type, editor will pick just one
|
|
14988
15043
|
* ])
|
|
14989
15044
|
* ```
|
|
14990
|
-
* @stubbed
|
|
14991
15045
|
*/
|
|
14992
15046
|
items: NotebookCellOutputItem[];
|
|
14993
15047
|
|
|
14994
15048
|
/**
|
|
14995
15049
|
* Arbitrary metadata for this cell output. Can be anything but must be JSON-stringifyable.
|
|
14996
|
-
* @stubbed
|
|
14997
15050
|
*/
|
|
14998
15051
|
metadata?: { [key: string]: any };
|
|
14999
15052
|
|
|
@@ -15002,7 +15055,6 @@ export module '@theia/plugin' {
|
|
|
15002
15055
|
*
|
|
15003
15056
|
* @param items Notebook output items.
|
|
15004
15057
|
* @param metadata Optional metadata.
|
|
15005
|
-
* @stubbed
|
|
15006
15058
|
*/
|
|
15007
15059
|
constructor(items: NotebookCellOutputItem[], metadata?: { [key: string]: any });
|
|
15008
15060
|
}
|
|
@@ -15014,26 +15066,22 @@ export module '@theia/plugin' {
|
|
|
15014
15066
|
|
|
15015
15067
|
/**
|
|
15016
15068
|
* The {@link NotebookCellKind kind} of this cell data.
|
|
15017
|
-
* @stubbed
|
|
15018
15069
|
*/
|
|
15019
15070
|
kind: NotebookCellKind;
|
|
15020
15071
|
|
|
15021
15072
|
/**
|
|
15022
15073
|
* The source value of this cell data - either source code or formatted text.
|
|
15023
|
-
* @stubbed
|
|
15024
15074
|
*/
|
|
15025
15075
|
value: string;
|
|
15026
15076
|
|
|
15027
15077
|
/**
|
|
15028
15078
|
* The language identifier of the source value of this cell data. Any value from
|
|
15029
15079
|
* {@linkcode languages.getLanguages getLanguages} is possible.
|
|
15030
|
-
* @stubbed
|
|
15031
15080
|
*/
|
|
15032
15081
|
languageId: string;
|
|
15033
15082
|
|
|
15034
15083
|
/**
|
|
15035
15084
|
* The outputs of this cell data.
|
|
15036
|
-
* @stubbed
|
|
15037
15085
|
*/
|
|
15038
15086
|
outputs?: NotebookCellOutput[];
|
|
15039
15087
|
|
|
@@ -15044,7 +15092,6 @@ export module '@theia/plugin' {
|
|
|
15044
15092
|
|
|
15045
15093
|
/**
|
|
15046
15094
|
* The execution summary of this cell data.
|
|
15047
|
-
* @stubbed
|
|
15048
15095
|
*/
|
|
15049
15096
|
executionSummary?: NotebookCellExecutionSummary;
|
|
15050
15097
|
|
|
@@ -15055,7 +15102,6 @@ export module '@theia/plugin' {
|
|
|
15055
15102
|
* @param kind The kind.
|
|
15056
15103
|
* @param value The source value.
|
|
15057
15104
|
* @param languageId The language identifier of the source value.
|
|
15058
|
-
* @stubbed
|
|
15059
15105
|
*/
|
|
15060
15106
|
constructor(kind: NotebookCellKind, value: string, languageId: string);
|
|
15061
15107
|
}
|
|
@@ -15071,13 +15117,11 @@ export module '@theia/plugin' {
|
|
|
15071
15117
|
export class NotebookData {
|
|
15072
15118
|
/**
|
|
15073
15119
|
* The cell data of this notebook data.
|
|
15074
|
-
* @stubbed
|
|
15075
15120
|
*/
|
|
15076
15121
|
cells: NotebookCellData[];
|
|
15077
15122
|
|
|
15078
15123
|
/**
|
|
15079
15124
|
* Arbitrary metadata of notebook data.
|
|
15080
|
-
* @stubbed
|
|
15081
15125
|
*/
|
|
15082
15126
|
metadata?: { [key: string]: any };
|
|
15083
15127
|
|
|
@@ -15085,7 +15129,6 @@ export module '@theia/plugin' {
|
|
|
15085
15129
|
* Create new notebook data.
|
|
15086
15130
|
*
|
|
15087
15131
|
* @param cells An array of cell data.
|
|
15088
|
-
* @stubbed
|
|
15089
15132
|
*/
|
|
15090
15133
|
constructor(cells: NotebookCellData[]);
|
|
15091
15134
|
}
|
|
@@ -15106,7 +15149,6 @@ export module '@theia/plugin' {
|
|
|
15106
15149
|
* @param content Contents of a notebook file.
|
|
15107
15150
|
* @param token A cancellation token.
|
|
15108
15151
|
* @return Notebook data or a thenable that resolves to such.
|
|
15109
|
-
* @stubbed
|
|
15110
15152
|
*/
|
|
15111
15153
|
deserializeNotebook(content: Uint8Array, token: CancellationToken): NotebookData | Thenable<NotebookData>;
|
|
15112
15154
|
|
|
@@ -15116,7 +15158,6 @@ export module '@theia/plugin' {
|
|
|
15116
15158
|
* @param data A notebook data structure.
|
|
15117
15159
|
* @param token A cancellation token.
|
|
15118
15160
|
* @returns An array of bytes or a thenable that resolves to such.
|
|
15119
|
-
* @stubbed
|
|
15120
15161
|
*/
|
|
15121
15162
|
serializeNotebook(data: NotebookData, token: CancellationToken): Uint8Array | Thenable<Uint8Array>;
|
|
15122
15163
|
}
|
|
@@ -15132,7 +15173,6 @@ export module '@theia/plugin' {
|
|
|
15132
15173
|
* Controls if output change events will trigger notebook document content change events and
|
|
15133
15174
|
* if it will be used in the diff editor, defaults to false. If the content provider doesn't
|
|
15134
15175
|
* persist the outputs in the file document, this should be set to true.
|
|
15135
|
-
* @stubbed
|
|
15136
15176
|
*/
|
|
15137
15177
|
transientOutputs?: boolean;
|
|
15138
15178
|
|
|
@@ -15141,7 +15181,6 @@ export module '@theia/plugin' {
|
|
|
15141
15181
|
* change events and if it will be used in the diff editor, defaults to false. If the
|
|
15142
15182
|
* content provider doesn't persist a metadata property in the file document, it should be
|
|
15143
15183
|
* set to true.
|
|
15144
|
-
* @stubbed
|
|
15145
15184
|
*/
|
|
15146
15185
|
transientCellMetadata?: { [key: string]: boolean | undefined };
|
|
15147
15186
|
|
|
@@ -15150,7 +15189,6 @@ export module '@theia/plugin' {
|
|
|
15150
15189
|
* content change event and if it will be used in the diff editor, defaults to false. If the
|
|
15151
15190
|
* content provider doesn't persist a metadata property in the file document, it should be
|
|
15152
15191
|
* set to true.
|
|
15153
|
-
* @stubbed
|
|
15154
15192
|
*/
|
|
15155
15193
|
transientDocumentMetadata?: { [key: string]: boolean | undefined };
|
|
15156
15194
|
}
|
|
@@ -15165,13 +15203,11 @@ export module '@theia/plugin' {
|
|
|
15165
15203
|
* will be created as needed up to the maximum of {@linkcode ViewColumn.Nine}.
|
|
15166
15204
|
* Use {@linkcode ViewColumn.Beside} to open the editor to the side of the currently
|
|
15167
15205
|
* active one.
|
|
15168
|
-
* @stubbed
|
|
15169
15206
|
*/
|
|
15170
15207
|
readonly viewColumn?: ViewColumn;
|
|
15171
15208
|
|
|
15172
15209
|
/**
|
|
15173
15210
|
* An optional flag that when `true` will stop the {@link NotebookEditor notebook editor} from taking focus.
|
|
15174
|
-
* @stubbed
|
|
15175
15211
|
*/
|
|
15176
15212
|
readonly preserveFocus?: boolean;
|
|
15177
15213
|
|
|
@@ -15179,13 +15215,11 @@ export module '@theia/plugin' {
|
|
|
15179
15215
|
* An optional flag that controls if an {@link NotebookEditor notebook editor}-tab shows as preview. Preview tabs will
|
|
15180
15216
|
* be replaced and reused until set to stay - either explicitly or through editing. The default behaviour depends
|
|
15181
15217
|
* on the `workbench.editor.enablePreview`-setting.
|
|
15182
|
-
* @stubbed
|
|
15183
15218
|
*/
|
|
15184
15219
|
readonly preview?: boolean;
|
|
15185
15220
|
|
|
15186
15221
|
/**
|
|
15187
15222
|
* An optional selection to apply for the document in the {@link NotebookEditor notebook editor}.
|
|
15188
|
-
* @stubbed
|
|
15189
15223
|
*/
|
|
15190
15224
|
readonly selections?: readonly NotebookRange[];
|
|
15191
15225
|
}
|
|
@@ -15248,7 +15282,6 @@ export module '@theia/plugin' {
|
|
|
15248
15282
|
*
|
|
15249
15283
|
* @param range The range of cells to replace
|
|
15250
15284
|
* @param newCells The new notebook cells.
|
|
15251
|
-
* @stubbed
|
|
15252
15285
|
*/
|
|
15253
15286
|
static replaceCells(range: NotebookRange, newCells: NotebookCellData[]): NotebookEdit;
|
|
15254
15287
|
|
|
@@ -15257,7 +15290,6 @@ export module '@theia/plugin' {
|
|
|
15257
15290
|
*
|
|
15258
15291
|
* @param index The index to insert cells at.
|
|
15259
15292
|
* @param newCells The new notebook cells.
|
|
15260
|
-
* @stubbed
|
|
15261
15293
|
*/
|
|
15262
15294
|
static insertCells(index: number, newCells: NotebookCellData[]): NotebookEdit;
|
|
15263
15295
|
|
|
@@ -15265,7 +15297,6 @@ export module '@theia/plugin' {
|
|
|
15265
15297
|
* Utility to create an edit that deletes cells in a notebook.
|
|
15266
15298
|
*
|
|
15267
15299
|
* @param range The range of cells to delete.
|
|
15268
|
-
* @stubbed
|
|
15269
15300
|
*/
|
|
15270
15301
|
static deleteCells(range: NotebookRange): NotebookEdit;
|
|
15271
15302
|
|
|
@@ -15274,7 +15305,6 @@ export module '@theia/plugin' {
|
|
|
15274
15305
|
*
|
|
15275
15306
|
* @param index The index of the cell to update.
|
|
15276
15307
|
* @param newCellMetadata The new metadata for the cell.
|
|
15277
|
-
* @stubbed
|
|
15278
15308
|
*/
|
|
15279
15309
|
static updateCellMetadata(index: number, newCellMetadata: { [key: string]: any }): NotebookEdit;
|
|
15280
15310
|
|
|
@@ -15282,31 +15312,26 @@ export module '@theia/plugin' {
|
|
|
15282
15312
|
* Utility to create an edit that updates the notebook's metadata.
|
|
15283
15313
|
*
|
|
15284
15314
|
* @param newNotebookMetadata The new metadata for the notebook.
|
|
15285
|
-
* @stubbed
|
|
15286
15315
|
*/
|
|
15287
15316
|
static updateNotebookMetadata(newNotebookMetadata: { [key: string]: any }): NotebookEdit;
|
|
15288
15317
|
|
|
15289
15318
|
/**
|
|
15290
15319
|
* Range of the cells being edited. May be empty.
|
|
15291
|
-
* @stubbed
|
|
15292
15320
|
*/
|
|
15293
15321
|
range: NotebookRange;
|
|
15294
15322
|
|
|
15295
15323
|
/**
|
|
15296
15324
|
* New cells being inserted. May be empty.
|
|
15297
|
-
* @stubbed
|
|
15298
15325
|
*/
|
|
15299
15326
|
newCells: NotebookCellData[];
|
|
15300
15327
|
|
|
15301
15328
|
/**
|
|
15302
15329
|
* Optional new metadata for the cells.
|
|
15303
|
-
* @stubbed
|
|
15304
15330
|
*/
|
|
15305
15331
|
newCellMetadata?: { [key: string]: any };
|
|
15306
15332
|
|
|
15307
15333
|
/**
|
|
15308
15334
|
* Optional new metadata for the notebook.
|
|
15309
|
-
* @stubbed
|
|
15310
15335
|
*/
|
|
15311
15336
|
newNotebookMetadata?: { [key: string]: any };
|
|
15312
15337
|
|
|
@@ -15319,13 +15344,11 @@ export module '@theia/plugin' {
|
|
|
15319
15344
|
export interface NotebookEditorSelectionChangeEvent {
|
|
15320
15345
|
/**
|
|
15321
15346
|
* The {@link NotebookEditor notebook editor} for which the selections have changed.
|
|
15322
|
-
* @stubbed
|
|
15323
15347
|
*/
|
|
15324
15348
|
readonly notebookEditor: NotebookEditor;
|
|
15325
15349
|
|
|
15326
15350
|
/**
|
|
15327
15351
|
* The new value for the {@link NotebookEditor.selections notebook editor's selections}.
|
|
15328
|
-
* @stubbed
|
|
15329
15352
|
*/
|
|
15330
15353
|
readonly selections: readonly NotebookRange[];
|
|
15331
15354
|
}
|
|
@@ -15336,13 +15359,11 @@ export module '@theia/plugin' {
|
|
|
15336
15359
|
export interface NotebookEditorVisibleRangesChangeEvent {
|
|
15337
15360
|
/**
|
|
15338
15361
|
* The {@link NotebookEditor notebook editor} for which the visible ranges have changed.
|
|
15339
|
-
* @stubbed
|
|
15340
15362
|
*/
|
|
15341
15363
|
readonly notebookEditor: NotebookEditor;
|
|
15342
15364
|
|
|
15343
15365
|
/**
|
|
15344
15366
|
* The new value for the {@link NotebookEditor.visibleRanges notebook editor's visibleRanges}.
|
|
15345
|
-
* @stubbed
|
|
15346
15367
|
*/
|
|
15347
15368
|
readonly visibleRanges: readonly NotebookRange[];
|
|
15348
15369
|
}
|
|
@@ -15383,13 +15404,11 @@ export module '@theia/plugin' {
|
|
|
15383
15404
|
*
|
|
15384
15405
|
* _Note_ that controllers are remembered by their identifier and that extensions should use
|
|
15385
15406
|
* stable identifiers across sessions.
|
|
15386
|
-
* @stubbed
|
|
15387
15407
|
*/
|
|
15388
15408
|
readonly id: string;
|
|
15389
15409
|
|
|
15390
15410
|
/**
|
|
15391
15411
|
* The notebook type this controller is for.
|
|
15392
|
-
* @stubbed
|
|
15393
15412
|
*/
|
|
15394
15413
|
readonly notebookType: string;
|
|
15395
15414
|
|
|
@@ -15407,32 +15426,27 @@ export module '@theia/plugin' {
|
|
|
15407
15426
|
* myController.supportedLanguages = undefined; // falsy
|
|
15408
15427
|
* myController.supportedLanguages = []; // falsy
|
|
15409
15428
|
* ```
|
|
15410
|
-
* @stubbed
|
|
15411
15429
|
*/
|
|
15412
15430
|
supportedLanguages?: string[];
|
|
15413
15431
|
|
|
15414
15432
|
/**
|
|
15415
15433
|
* The human-readable label of this notebook controller.
|
|
15416
|
-
* @stubbed
|
|
15417
15434
|
*/
|
|
15418
15435
|
label: string;
|
|
15419
15436
|
|
|
15420
15437
|
/**
|
|
15421
15438
|
* The human-readable description which is rendered less prominent.
|
|
15422
|
-
* @stubbed
|
|
15423
15439
|
*/
|
|
15424
15440
|
description?: string;
|
|
15425
15441
|
|
|
15426
15442
|
/**
|
|
15427
15443
|
* The human-readable detail which is rendered less prominent.
|
|
15428
|
-
* @stubbed
|
|
15429
15444
|
*/
|
|
15430
15445
|
detail?: string;
|
|
15431
15446
|
|
|
15432
15447
|
/**
|
|
15433
15448
|
* Whether this controller supports execution order so that the
|
|
15434
15449
|
* editor can render placeholders for them.
|
|
15435
|
-
* @stubbed
|
|
15436
15450
|
*/
|
|
15437
15451
|
supportsExecutionOrder?: boolean;
|
|
15438
15452
|
|
|
@@ -15448,14 +15462,12 @@ export module '@theia/plugin' {
|
|
|
15448
15462
|
*
|
|
15449
15463
|
* @param cell The notebook cell for which to create the execution.
|
|
15450
15464
|
* @returns A notebook cell execution.
|
|
15451
|
-
* @stubbed
|
|
15452
15465
|
*/
|
|
15453
15466
|
createNotebookCellExecution(cell: NotebookCell): NotebookCellExecution;
|
|
15454
15467
|
|
|
15455
15468
|
/**
|
|
15456
15469
|
* The execute handler is invoked when the run gestures in the UI are selected, e.g Run Cell, Run All,
|
|
15457
15470
|
* Run Selection etc. The execute handler is responsible for creating and managing {@link NotebookCellExecution execution}-objects.
|
|
15458
|
-
* @stubbed
|
|
15459
15471
|
*/
|
|
15460
15472
|
executeHandler: (cells: NotebookCell[], notebook: NotebookDocument, controller: NotebookController) => void | Thenable<void>;
|
|
15461
15473
|
|
|
@@ -15470,7 +15482,6 @@ export module '@theia/plugin' {
|
|
|
15470
15482
|
*
|
|
15471
15483
|
* _Note_ that supporting {@link NotebookCellExecution.token cancellation tokens} is preferred and that interrupt handlers should
|
|
15472
15484
|
* only be used when tokens cannot be supported.
|
|
15473
|
-
* @stubbed
|
|
15474
15485
|
*/
|
|
15475
15486
|
interruptHandler?: (notebook: NotebookDocument) => void | Thenable<void>;
|
|
15476
15487
|
|
|
@@ -15483,7 +15494,6 @@ export module '@theia/plugin' {
|
|
|
15483
15494
|
*
|
|
15484
15495
|
* _Note_ that controller selection is persisted (by the controllers {@link NotebookController.id id}) and restored as soon as a
|
|
15485
15496
|
* controller is re-created or as a notebook is {@link workspace.onDidOpenNotebookDocument opened}.
|
|
15486
|
-
* @stubbed
|
|
15487
15497
|
*/
|
|
15488
15498
|
readonly onDidChangeSelectedNotebooks: Event<{ readonly notebook: NotebookDocument; readonly selected: boolean }>;
|
|
15489
15499
|
|
|
@@ -15493,13 +15503,11 @@ export module '@theia/plugin' {
|
|
|
15493
15503
|
*
|
|
15494
15504
|
* @param notebook The notebook for which a priority is set.
|
|
15495
15505
|
* @param affinity A controller affinity
|
|
15496
|
-
* @stubbed
|
|
15497
15506
|
*/
|
|
15498
15507
|
updateNotebookAffinity(notebook: NotebookDocument, affinity: NotebookControllerAffinity): void;
|
|
15499
15508
|
|
|
15500
15509
|
/**
|
|
15501
15510
|
* Dispose and free associated resources.
|
|
15502
|
-
* @stubbed
|
|
15503
15511
|
*/
|
|
15504
15512
|
dispose(): void;
|
|
15505
15513
|
}
|
|
@@ -15516,7 +15524,6 @@ export module '@theia/plugin' {
|
|
|
15516
15524
|
|
|
15517
15525
|
/**
|
|
15518
15526
|
* The {@link NotebookCell cell} for which this execution has been created.
|
|
15519
|
-
* @stubbed
|
|
15520
15527
|
*/
|
|
15521
15528
|
readonly cell: NotebookCell;
|
|
15522
15529
|
|
|
@@ -15526,13 +15533,11 @@ export module '@theia/plugin' {
|
|
|
15526
15533
|
*
|
|
15527
15534
|
* _Note_ that the cancellation token will not be triggered when the {@link NotebookController controller}
|
|
15528
15535
|
* that created this execution uses an {@link NotebookController.interruptHandler interrupt-handler}.
|
|
15529
|
-
* @stubbed
|
|
15530
15536
|
*/
|
|
15531
15537
|
readonly token: CancellationToken;
|
|
15532
15538
|
|
|
15533
15539
|
/**
|
|
15534
15540
|
* Set and unset the order of this cell execution.
|
|
15535
|
-
* @stubbed
|
|
15536
15541
|
*/
|
|
15537
15542
|
executionOrder: number | undefined;
|
|
15538
15543
|
|
|
@@ -15541,7 +15546,6 @@ export module '@theia/plugin' {
|
|
|
15541
15546
|
*
|
|
15542
15547
|
* @param startTime The time that execution began, in milliseconds in the Unix epoch. Used to drive the clock
|
|
15543
15548
|
* that shows for how long a cell has been running. If not given, the clock won't be shown.
|
|
15544
|
-
* @stubbed
|
|
15545
15549
|
*/
|
|
15546
15550
|
start(startTime?: number): void;
|
|
15547
15551
|
|
|
@@ -15552,7 +15556,6 @@ export module '@theia/plugin' {
|
|
|
15552
15556
|
* If false, a red X is shown.
|
|
15553
15557
|
* If undefined, no check or X icon is shown.
|
|
15554
15558
|
* @param endTime The time that execution finished, in milliseconds in the Unix epoch.
|
|
15555
|
-
* @stubbed
|
|
15556
15559
|
*/
|
|
15557
15560
|
end(success: boolean | undefined, endTime?: number): void;
|
|
15558
15561
|
|
|
@@ -15562,7 +15565,6 @@ export module '@theia/plugin' {
|
|
|
15562
15565
|
* @param cell Cell for which output is cleared. Defaults to the {@link NotebookCellExecution.cell cell} of
|
|
15563
15566
|
* this execution.
|
|
15564
15567
|
* @return A thenable that resolves when the operation finished.
|
|
15565
|
-
* @stubbed
|
|
15566
15568
|
*/
|
|
15567
15569
|
clearOutput(cell?: NotebookCell): Thenable<void>;
|
|
15568
15570
|
|
|
@@ -15573,7 +15575,6 @@ export module '@theia/plugin' {
|
|
|
15573
15575
|
* @param cell Cell for which output is cleared. Defaults to the {@link NotebookCellExecution.cell cell} of
|
|
15574
15576
|
* this execution.
|
|
15575
15577
|
* @return A thenable that resolves when the operation finished.
|
|
15576
|
-
* @stubbed
|
|
15577
15578
|
*/
|
|
15578
15579
|
replaceOutput(out: NotebookCellOutput | readonly NotebookCellOutput[], cell?: NotebookCell): Thenable<void>;
|
|
15579
15580
|
|
|
@@ -15584,7 +15585,6 @@ export module '@theia/plugin' {
|
|
|
15584
15585
|
* @param cell Cell for which output is cleared. Defaults to the {@link NotebookCellExecution.cell cell} of
|
|
15585
15586
|
* this execution.
|
|
15586
15587
|
* @return A thenable that resolves when the operation finished.
|
|
15587
|
-
* @stubbed
|
|
15588
15588
|
*/
|
|
15589
15589
|
appendOutput(out: NotebookCellOutput | readonly NotebookCellOutput[], cell?: NotebookCell): Thenable<void>;
|
|
15590
15590
|
|
|
@@ -15594,7 +15594,6 @@ export module '@theia/plugin' {
|
|
|
15594
15594
|
* @param items Output items that replace the items of existing output.
|
|
15595
15595
|
* @param output Output object that already exists.
|
|
15596
15596
|
* @return A thenable that resolves when the operation finished.
|
|
15597
|
-
* @stubbed
|
|
15598
15597
|
*/
|
|
15599
15598
|
replaceOutputItems(items: NotebookCellOutputItem | readonly NotebookCellOutputItem[], output: NotebookCellOutput): Thenable<void>;
|
|
15600
15599
|
|
|
@@ -15604,7 +15603,6 @@ export module '@theia/plugin' {
|
|
|
15604
15603
|
* @param items Output items that are append to existing output.
|
|
15605
15604
|
* @param output Output object that already exists.
|
|
15606
15605
|
* @return A thenable that resolves when the operation finished.
|
|
15607
|
-
* @stubbed
|
|
15608
15606
|
*/
|
|
15609
15607
|
appendOutputItems(items: NotebookCellOutputItem | readonly NotebookCellOutputItem[], output: NotebookCellOutput): Thenable<void>;
|
|
15610
15608
|
}
|
|
@@ -15631,7 +15629,6 @@ export module '@theia/plugin' {
|
|
|
15631
15629
|
export class NotebookCellStatusBarItem {
|
|
15632
15630
|
/**
|
|
15633
15631
|
* The text to show for the item.
|
|
15634
|
-
* @stubbed
|
|
15635
15632
|
*/
|
|
15636
15633
|
text: string;
|
|
15637
15634
|
|
|
@@ -15648,25 +15645,21 @@ export module '@theia/plugin' {
|
|
|
15648
15645
|
*
|
|
15649
15646
|
* Note that if this is a {@linkcode Command} object, only the {@linkcode Command.command command} and {@linkcode Command.arguments arguments}
|
|
15650
15647
|
* are used by the editor.
|
|
15651
|
-
* @stubbed
|
|
15652
15648
|
*/
|
|
15653
15649
|
command?: string | Command;
|
|
15654
15650
|
|
|
15655
15651
|
/**
|
|
15656
15652
|
* A tooltip to show when the item is hovered.
|
|
15657
|
-
* @stubbed
|
|
15658
15653
|
*/
|
|
15659
15654
|
tooltip?: string;
|
|
15660
15655
|
|
|
15661
15656
|
/**
|
|
15662
15657
|
* The priority of the item. A higher value item will be shown more to the left.
|
|
15663
|
-
* @stubbed
|
|
15664
15658
|
*/
|
|
15665
15659
|
priority?: number;
|
|
15666
15660
|
|
|
15667
15661
|
/**
|
|
15668
15662
|
* Accessibility information used when a screen reader interacts with this item.
|
|
15669
|
-
* @stubbed
|
|
15670
15663
|
*/
|
|
15671
15664
|
accessibilityInformation?: AccessibilityInformation;
|
|
15672
15665
|
|
|
@@ -15674,7 +15667,6 @@ export module '@theia/plugin' {
|
|
|
15674
15667
|
* Creates a new NotebookCellStatusBarItem.
|
|
15675
15668
|
* @param text The text to show for the item.
|
|
15676
15669
|
* @param alignment Whether the item is aligned to the left or right.
|
|
15677
|
-
* @stubbed
|
|
15678
15670
|
*/
|
|
15679
15671
|
constructor(text: string, alignment: NotebookCellStatusBarAlignment);
|
|
15680
15672
|
}
|
|
@@ -15685,7 +15677,6 @@ export module '@theia/plugin' {
|
|
|
15685
15677
|
export interface NotebookCellStatusBarItemProvider {
|
|
15686
15678
|
/**
|
|
15687
15679
|
* An optional event to signal that statusbar items have changed. The provide method will be called again.
|
|
15688
|
-
* @stubbed
|
|
15689
15680
|
*/
|
|
15690
15681
|
onDidChangeCellStatusBarItems?: Event<void>;
|
|
15691
15682
|
|
|
@@ -15694,7 +15685,6 @@ export module '@theia/plugin' {
|
|
|
15694
15685
|
* @param cell The cell for which to return items.
|
|
15695
15686
|
* @param token A token triggered if this request should be cancelled.
|
|
15696
15687
|
* @return One or more {@link NotebookCellStatusBarItem cell statusbar items}
|
|
15697
|
-
* @stubbed
|
|
15698
15688
|
*/
|
|
15699
15689
|
provideCellStatusBarItems(cell: NotebookCell, token: CancellationToken): ProviderResult<NotebookCellStatusBarItem | NotebookCellStatusBarItem[]>;
|
|
15700
15690
|
}
|
|
@@ -15716,7 +15706,6 @@ export module '@theia/plugin' {
|
|
|
15716
15706
|
* @param label The label of the controller.
|
|
15717
15707
|
* @param handler The execute-handler of the controller.
|
|
15718
15708
|
* @returns a new instance of {@link NotebookController}
|
|
15719
|
-
* @stubbed
|
|
15720
15709
|
*/
|
|
15721
15710
|
export function createNotebookController(
|
|
15722
15711
|
id: string,
|
|
@@ -15732,7 +15721,6 @@ export module '@theia/plugin' {
|
|
|
15732
15721
|
* - Note 2: A renderer only has access to messaging if requiresMessaging is set to always or optional in its notebookRenderer contribution.
|
|
15733
15722
|
* @param rendererId The renderer ID to communicate with
|
|
15734
15723
|
* @returns A new notebook renderer messaging object.
|
|
15735
|
-
* @stubbed
|
|
15736
15724
|
*/
|
|
15737
15725
|
export function createRendererMessaging(rendererId: string): NotebookRendererMessaging;
|
|
15738
15726
|
|
|
@@ -15741,630 +15729,648 @@ export module '@theia/plugin' {
|
|
|
15741
15729
|
* @param notebookType The notebook type to register for.
|
|
15742
15730
|
* @param provider A cell status bar provider.
|
|
15743
15731
|
* @returns A Disposable that unregisters this provider when being disposed.
|
|
15744
|
-
* @stubbed
|
|
15745
15732
|
*/
|
|
15746
15733
|
export function registerNotebookCellStatusBarItemProvider(notebookType: string, provider: NotebookCellStatusBarItemProvider): Disposable;
|
|
15747
15734
|
}
|
|
15748
|
-
}
|
|
15749
15735
|
|
|
15750
|
-
/**
|
|
15751
|
-
* Namespace for testing functionality. Tests are published by registering
|
|
15752
|
-
* {@link TestController} instances, then adding {@link TestItem TestItems}.
|
|
15753
|
-
* Controllers may also describe how to run tests by creating one or more
|
|
15754
|
-
* {@link TestRunProfile} instances.
|
|
15755
|
-
*/
|
|
15756
|
-
export namespace tests {
|
|
15757
15736
|
/**
|
|
15758
|
-
*
|
|
15759
|
-
*
|
|
15760
|
-
*
|
|
15761
|
-
* @
|
|
15762
|
-
* @returns An instance of the {@link TestController}.
|
|
15763
|
-
* @stubbed
|
|
15737
|
+
* Namespace for testing functionality. Tests are published by registering
|
|
15738
|
+
* {@link TestController} instances, then adding {@link TestItem TestItems}.
|
|
15739
|
+
* Controllers may also describe how to run tests by creating one or more
|
|
15740
|
+
* {@link TestRunProfile} instances.
|
|
15764
15741
|
*/
|
|
15765
|
-
export
|
|
15766
|
-
|
|
15767
|
-
|
|
15768
|
-
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
}
|
|
15742
|
+
export namespace tests {
|
|
15743
|
+
/**
|
|
15744
|
+
* Creates a new test controller.
|
|
15745
|
+
*
|
|
15746
|
+
* @param id Identifier for the controller, must be globally unique.
|
|
15747
|
+
* @param label A human-readable label for the controller.
|
|
15748
|
+
* @returns An instance of the {@link TestController}.
|
|
15749
|
+
* @stubbed
|
|
15750
|
+
*/
|
|
15751
|
+
export function createTestController(id: string, label: string): TestController;
|
|
15752
|
+
}
|
|
15776
15753
|
|
|
15777
|
-
/**
|
|
15778
|
-
* Tags can be associated with {@link TestItem TestItems} and
|
|
15779
|
-
* {@link TestRunProfile TestRunProfiles}. A profile with a tag can only
|
|
15780
|
-
* execute tests that include that tag in their {@link TestItem.tags} array.
|
|
15781
|
-
*/
|
|
15782
|
-
export class TestTag {
|
|
15783
15754
|
/**
|
|
15784
|
-
*
|
|
15785
|
-
* to be identical.
|
|
15755
|
+
* The kind of executions that {@link TestRunProfile TestRunProfiles} control.
|
|
15786
15756
|
*/
|
|
15787
|
-
|
|
15757
|
+
export enum TestRunProfileKind {
|
|
15758
|
+
Run = 1,
|
|
15759
|
+
Debug = 2,
|
|
15760
|
+
Coverage = 3,
|
|
15761
|
+
}
|
|
15788
15762
|
|
|
15789
15763
|
/**
|
|
15790
|
-
*
|
|
15791
|
-
* @
|
|
15764
|
+
* Tags can be associated with {@link TestItem TestItems} and
|
|
15765
|
+
* {@link TestRunProfile TestRunProfiles}. A profile with a tag can only
|
|
15766
|
+
* execute tests that include that tag in their {@link TestItem.tags} array.
|
|
15792
15767
|
*/
|
|
15793
|
-
|
|
15794
|
-
|
|
15768
|
+
export class TestTag {
|
|
15769
|
+
/**
|
|
15770
|
+
* ID of the test tag. `TestTag` instances with the same ID are considered
|
|
15771
|
+
* to be identical.
|
|
15772
|
+
*/
|
|
15773
|
+
readonly id: string;
|
|
15795
15774
|
|
|
15796
|
-
/**
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
*
|
|
15803
|
-
* Note that the label has some significance if the user requests that
|
|
15804
|
-
* tests be re-run in a certain way. For example, if tests were run
|
|
15805
|
-
* normally and the user requests to re-run them in debug mode, the editor
|
|
15806
|
-
* will attempt use a configuration with the same label of the `Debug`
|
|
15807
|
-
* kind. If there is no such configuration, the default will be used.
|
|
15808
|
-
* @stubbed
|
|
15809
|
-
*/
|
|
15810
|
-
label: string;
|
|
15775
|
+
/**
|
|
15776
|
+
* Creates a new TestTag instance.
|
|
15777
|
+
* @param id ID of the test tag.
|
|
15778
|
+
*/
|
|
15779
|
+
constructor(id: string);
|
|
15780
|
+
}
|
|
15811
15781
|
|
|
15812
15782
|
/**
|
|
15813
|
-
*
|
|
15814
|
-
* are no profiles for a kind, it will not be available in the UI.
|
|
15815
|
-
* @stubbed
|
|
15783
|
+
* A TestRunProfile describes one way to execute tests in a {@link TestController}.
|
|
15816
15784
|
*/
|
|
15817
|
-
|
|
15785
|
+
export interface TestRunProfile {
|
|
15786
|
+
/**
|
|
15787
|
+
* Label shown to the user in the UI.
|
|
15788
|
+
*
|
|
15789
|
+
* Note that the label has some significance if the user requests that
|
|
15790
|
+
* tests be re-run in a certain way. For example, if tests were run
|
|
15791
|
+
* normally and the user requests to re-run them in debug mode, the editor
|
|
15792
|
+
* will attempt use a configuration with the same label of the `Debug`
|
|
15793
|
+
* kind. If there is no such configuration, the default will be used.
|
|
15794
|
+
* @stubbed
|
|
15795
|
+
*/
|
|
15796
|
+
label: string;
|
|
15818
15797
|
|
|
15819
|
-
|
|
15820
|
-
|
|
15821
|
-
|
|
15822
|
-
|
|
15823
|
-
|
|
15824
|
-
|
|
15825
|
-
* @stubbed
|
|
15826
|
-
*/
|
|
15827
|
-
isDefault: boolean;
|
|
15798
|
+
/**
|
|
15799
|
+
* Configures what kind of execution this profile controls. If there
|
|
15800
|
+
* are no profiles for a kind, it will not be available in the UI.
|
|
15801
|
+
* @stubbed
|
|
15802
|
+
*/
|
|
15803
|
+
readonly kind: TestRunProfileKind;
|
|
15828
15804
|
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
|
|
15832
|
-
|
|
15833
|
-
|
|
15834
|
-
|
|
15835
|
-
|
|
15805
|
+
/**
|
|
15806
|
+
* Controls whether this profile is the default action that will
|
|
15807
|
+
* be taken when its kind is actioned. For example, if the user clicks
|
|
15808
|
+
* the generic "run all" button, then the default profile for
|
|
15809
|
+
* {@link TestRunProfileKind.Run} will be executed, although the
|
|
15810
|
+
* user can configure this.
|
|
15811
|
+
* @stubbed
|
|
15812
|
+
*/
|
|
15813
|
+
isDefault: boolean;
|
|
15836
15814
|
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
|
|
15840
|
-
|
|
15841
|
-
|
|
15842
|
-
|
|
15815
|
+
/**
|
|
15816
|
+
* Whether this profile supports continuous running of requests. If so,
|
|
15817
|
+
* then {@link TestRunRequest.continuous} may be set to `true`. Defaults
|
|
15818
|
+
* to false.
|
|
15819
|
+
* @stubbed
|
|
15820
|
+
*/
|
|
15821
|
+
supportsContinuousRun: boolean;
|
|
15843
15822
|
|
|
15844
|
-
|
|
15845
|
-
|
|
15846
|
-
|
|
15847
|
-
|
|
15848
|
-
|
|
15849
|
-
|
|
15850
|
-
*/
|
|
15851
|
-
configureHandler: (() => void) | undefined;
|
|
15823
|
+
/**
|
|
15824
|
+
* Associated tag for the profile. If this is set, only {@link TestItem}
|
|
15825
|
+
* instances with the same tag will be eligible to execute in this profile.
|
|
15826
|
+
* @stubbed
|
|
15827
|
+
*/
|
|
15828
|
+
tag: TestTag | undefined;
|
|
15852
15829
|
|
|
15853
|
-
|
|
15854
|
-
|
|
15855
|
-
|
|
15856
|
-
|
|
15857
|
-
|
|
15858
|
-
|
|
15859
|
-
|
|
15860
|
-
|
|
15861
|
-
* source code and create new test runs by calling {@link TestController.createTestRun},
|
|
15862
|
-
* until the cancellation is requested on the `token`.
|
|
15863
|
-
*
|
|
15864
|
-
* @param request Request information for the test run.
|
|
15865
|
-
* @param cancellationToken Token that signals the used asked to abort the
|
|
15866
|
-
* test run. If cancellation is requested on this token, all {@link TestRun}
|
|
15867
|
-
* instances associated with the request will be
|
|
15868
|
-
* automatically cancelled as well.
|
|
15869
|
-
* @stubbed
|
|
15870
|
-
*/
|
|
15871
|
-
runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void;
|
|
15830
|
+
/**
|
|
15831
|
+
* If this method is present, a configuration gear will be present in the
|
|
15832
|
+
* UI, and this method will be invoked when it's clicked. When called,
|
|
15833
|
+
* you can take other editor actions, such as showing a quick pick or
|
|
15834
|
+
* opening a configuration file.
|
|
15835
|
+
* @stubbed
|
|
15836
|
+
*/
|
|
15837
|
+
configureHandler: (() => void) | undefined;
|
|
15872
15838
|
|
|
15873
|
-
|
|
15874
|
-
|
|
15875
|
-
|
|
15876
|
-
|
|
15877
|
-
|
|
15878
|
-
|
|
15839
|
+
/**
|
|
15840
|
+
* Handler called to start a test run. When invoked, the function should call
|
|
15841
|
+
* {@link TestController.createTestRun} at least once, and all test runs
|
|
15842
|
+
* associated with the request should be created before the function returns
|
|
15843
|
+
* or the returned promise is resolved.
|
|
15844
|
+
*
|
|
15845
|
+
* If {@link supportsContinuousRun} is set, then {@link TestRunRequest.continuous}
|
|
15846
|
+
* may be `true`. In this case, the profile should observe changes to
|
|
15847
|
+
* source code and create new test runs by calling {@link TestController.createTestRun},
|
|
15848
|
+
* until the cancellation is requested on the `token`.
|
|
15849
|
+
*
|
|
15850
|
+
* @param request Request information for the test run.
|
|
15851
|
+
* @param cancellationToken Token that signals the used asked to abort the
|
|
15852
|
+
* test run. If cancellation is requested on this token, all {@link TestRun}
|
|
15853
|
+
* instances associated with the request will be
|
|
15854
|
+
* automatically cancelled as well.
|
|
15855
|
+
* @stubbed
|
|
15856
|
+
*/
|
|
15857
|
+
runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void;
|
|
15879
15858
|
|
|
15880
|
-
/**
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
|
|
15884
|
-
|
|
15885
|
-
|
|
15886
|
-
export interface TestController {
|
|
15887
|
-
/**
|
|
15888
|
-
* The id of the controller passed in {@link vscode.tests.createTestController}.
|
|
15889
|
-
* This must be globally unique.
|
|
15890
|
-
* @stubbed
|
|
15891
|
-
*/
|
|
15892
|
-
readonly id: string;
|
|
15859
|
+
/**
|
|
15860
|
+
* Deletes the run profile.
|
|
15861
|
+
* @stubbed
|
|
15862
|
+
*/
|
|
15863
|
+
dispose(): void;
|
|
15864
|
+
}
|
|
15893
15865
|
|
|
15894
15866
|
/**
|
|
15895
|
-
*
|
|
15896
|
-
*
|
|
15867
|
+
* Entry point to discover and execute tests. It contains {@link TestController.items} which
|
|
15868
|
+
* are used to populate the editor UI, and is associated with
|
|
15869
|
+
* {@link TestController.createRunProfile run profiles} to allow
|
|
15870
|
+
* for tests to be executed.
|
|
15897
15871
|
*/
|
|
15898
|
-
|
|
15872
|
+
export interface TestController {
|
|
15873
|
+
/**
|
|
15874
|
+
* The id of the controller passed in {@link vscode.tests.createTestController}.
|
|
15875
|
+
* This must be globally unique.
|
|
15876
|
+
* @stubbed
|
|
15877
|
+
*/
|
|
15878
|
+
readonly id: string;
|
|
15899
15879
|
|
|
15900
|
-
|
|
15901
|
-
|
|
15902
|
-
|
|
15903
|
-
|
|
15904
|
-
|
|
15905
|
-
* The extension controls when to add tests. For example, extensions should
|
|
15906
|
-
* add tests for a file when {@link vscode.workspace.onDidOpenTextDocument}
|
|
15907
|
-
* fires in order for decorations for tests within a file to be visible.
|
|
15908
|
-
*
|
|
15909
|
-
* However, the editor may sometimes explicitly request children using the
|
|
15910
|
-
* {@link resolveHandler} See the documentation on that method for more details.
|
|
15911
|
-
* @stubbed
|
|
15912
|
-
*/
|
|
15913
|
-
readonly items: TestItemCollection;
|
|
15880
|
+
/**
|
|
15881
|
+
* Human-readable label for the test controller.
|
|
15882
|
+
* @stubbed
|
|
15883
|
+
*/
|
|
15884
|
+
label: string;
|
|
15914
15885
|
|
|
15915
|
-
|
|
15916
|
-
|
|
15917
|
-
|
|
15918
|
-
|
|
15919
|
-
|
|
15920
|
-
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
|
|
15886
|
+
/**
|
|
15887
|
+
* A collection of "top-level" {@link TestItem} instances, which can in
|
|
15888
|
+
* turn have their own {@link TestItem.children children} to form the
|
|
15889
|
+
* "test tree."
|
|
15890
|
+
*
|
|
15891
|
+
* The extension controls when to add tests. For example, extensions should
|
|
15892
|
+
* add tests for a file when {@link vscode.workspace.onDidOpenTextDocument}
|
|
15893
|
+
* fires in order for decorations for tests within a file to be visible.
|
|
15894
|
+
*
|
|
15895
|
+
* However, the editor may sometimes explicitly request children using the
|
|
15896
|
+
* {@link resolveHandler} See the documentation on that method for more details.
|
|
15897
|
+
* @stubbed
|
|
15898
|
+
*/
|
|
15899
|
+
readonly items: TestItemCollection;
|
|
15929
15900
|
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
|
|
15933
|
-
|
|
15934
|
-
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15940
|
-
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
*
|
|
15945
|
-
* @param item An unresolved test item for which children are being
|
|
15946
|
-
* requested, or `undefined` to resolve the controller's initial {@link TestController.items items}.
|
|
15947
|
-
* @stubbed
|
|
15948
|
-
*/
|
|
15949
|
-
resolveHandler?: (item: TestItem | undefined) => Thenable<void> | void;
|
|
15901
|
+
/**
|
|
15902
|
+
* Creates a profile used for running tests. Extensions must create
|
|
15903
|
+
* at least one profile in order for tests to be run.
|
|
15904
|
+
* @param label A human-readable label for this profile.
|
|
15905
|
+
* @param kind Configures what kind of execution this profile manages.
|
|
15906
|
+
* @param runHandler Function called to start a test run.
|
|
15907
|
+
* @param isDefault Whether this is the default action for its kind.
|
|
15908
|
+
* @param tag Profile test tag.
|
|
15909
|
+
* @param supportsContinuousRun Whether the profile supports continuous running.
|
|
15910
|
+
* @returns An instance of a {@link TestRunProfile}, which is automatically
|
|
15911
|
+
* associated with this controller.
|
|
15912
|
+
* @stubbed
|
|
15913
|
+
*/
|
|
15914
|
+
createRunProfile(label: string, kind: TestRunProfileKind, runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void, isDefault?: boolean, tag?: TestTag, supportsContinuousRun?: boolean): TestRunProfile;
|
|
15950
15915
|
|
|
15951
|
-
|
|
15952
|
-
|
|
15953
|
-
|
|
15954
|
-
|
|
15955
|
-
|
|
15956
|
-
|
|
15957
|
-
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15916
|
+
/**
|
|
15917
|
+
* A function provided by the extension that the editor may call to request
|
|
15918
|
+
* children of a test item, if the {@link TestItem.canResolveChildren} is
|
|
15919
|
+
* `true`. When called, the item should discover children and call
|
|
15920
|
+
* {@link vscode.tests.createTestItem} as children are discovered.
|
|
15921
|
+
*
|
|
15922
|
+
* Generally the extension manages the lifecycle of test items, but under
|
|
15923
|
+
* certain conditions the editor may request the children of a specific
|
|
15924
|
+
* item to be loaded. For example, if the user requests to re-run tests
|
|
15925
|
+
* after reloading the editor, the editor may need to call this method
|
|
15926
|
+
* to resolve the previously-run tests.
|
|
15927
|
+
*
|
|
15928
|
+
* The item in the explorer will automatically be marked as "busy" until
|
|
15929
|
+
* the function returns or the returned thenable resolves.
|
|
15930
|
+
*
|
|
15931
|
+
* @param item An unresolved test item for which children are being
|
|
15932
|
+
* requested, or `undefined` to resolve the controller's initial {@link TestController.items items}.
|
|
15933
|
+
* @stubbed
|
|
15934
|
+
*/
|
|
15935
|
+
resolveHandler?: (item: TestItem | undefined) => Thenable<void> | void;
|
|
15964
15936
|
|
|
15965
|
-
|
|
15966
|
-
|
|
15967
|
-
|
|
15968
|
-
|
|
15969
|
-
|
|
15970
|
-
|
|
15971
|
-
|
|
15972
|
-
|
|
15973
|
-
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
* disambiguate multiple sets of results in a test run. It is useful if
|
|
15979
|
-
* tests are run across multiple platforms, for example.
|
|
15980
|
-
* @param persist Whether the results created by the run should be
|
|
15981
|
-
* persisted in the editor. This may be false if the results are coming from
|
|
15982
|
-
* a file already saved externally, such as a coverage information file.
|
|
15983
|
-
* @returns An instance of the {@link TestRun}. It will be considered "running"
|
|
15984
|
-
* from the moment this method is invoked until {@link TestRun.end} is called.
|
|
15985
|
-
* @stubbed
|
|
15986
|
-
*/
|
|
15987
|
-
createTestRun(request: TestRunRequest, name?: string, persist?: boolean): TestRun;
|
|
15988
|
-
|
|
15989
|
-
/**
|
|
15990
|
-
* Creates a new managed {@link TestItem} instance. It can be added into
|
|
15991
|
-
* the {@link TestItem.children} of an existing item, or into the
|
|
15992
|
-
* {@link TestController.items}.
|
|
15993
|
-
*
|
|
15994
|
-
* @param id Identifier for the TestItem. The test item's ID must be unique
|
|
15995
|
-
* in the {@link TestItemCollection} it's added to.
|
|
15996
|
-
* @param label Human-readable label of the test item.
|
|
15997
|
-
* @param uri URI this TestItem is associated with. May be a file or directory.
|
|
15998
|
-
* @stubbed
|
|
15999
|
-
*/
|
|
16000
|
-
createTestItem(id: string, label: string, uri?: Uri): TestItem;
|
|
15937
|
+
/**
|
|
15938
|
+
* If this method is present, a refresh button will be present in the
|
|
15939
|
+
* UI, and this method will be invoked when it's clicked. When called,
|
|
15940
|
+
* the extension should scan the workspace for any new, changed, or
|
|
15941
|
+
* removed tests.
|
|
15942
|
+
*
|
|
15943
|
+
* It's recommended that extensions try to update tests in realtime, using
|
|
15944
|
+
* a {@link FileSystemWatcher} for example, and use this method as a fallback.
|
|
15945
|
+
*
|
|
15946
|
+
* @returns A thenable that resolves when tests have been refreshed.
|
|
15947
|
+
* @stubbed
|
|
15948
|
+
*/
|
|
15949
|
+
refreshHandler: ((token: CancellationToken) => Thenable<void> | void) | undefined;
|
|
16001
15950
|
|
|
16002
|
-
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
15951
|
+
/**
|
|
15952
|
+
* Creates a {@link TestRun}. This should be called by the
|
|
15953
|
+
* {@link TestRunProfile} when a request is made to execute tests, and may
|
|
15954
|
+
* also be called if a test run is detected externally. Once created, tests
|
|
15955
|
+
* that are included in the request will be moved into the queued state.
|
|
15956
|
+
*
|
|
15957
|
+
* All runs created using the same `request` instance will be grouped
|
|
15958
|
+
* together. This is useful if, for example, a single suite of tests is
|
|
15959
|
+
* run on multiple platforms.
|
|
15960
|
+
*
|
|
15961
|
+
* @param request Test run request. Only tests inside the `include` may be
|
|
15962
|
+
* modified, and tests in its `exclude` are ignored.
|
|
15963
|
+
* @param name The human-readable name of the run. This can be used to
|
|
15964
|
+
* disambiguate multiple sets of results in a test run. It is useful if
|
|
15965
|
+
* tests are run across multiple platforms, for example.
|
|
15966
|
+
* @param persist Whether the results created by the run should be
|
|
15967
|
+
* persisted in the editor. This may be false if the results are coming from
|
|
15968
|
+
* a file already saved externally, such as a coverage information file.
|
|
15969
|
+
* @returns An instance of the {@link TestRun}. It will be considered "running"
|
|
15970
|
+
* from the moment this method is invoked until {@link TestRun.end} is called.
|
|
15971
|
+
* @stubbed
|
|
15972
|
+
*/
|
|
15973
|
+
createTestRun(request: TestRunRequest, name?: string, persist?: boolean): TestRun;
|
|
16009
15974
|
|
|
16010
|
-
/**
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
|
|
16020
|
-
|
|
16021
|
-
|
|
16022
|
-
|
|
16023
|
-
|
|
16024
|
-
|
|
16025
|
-
|
|
16026
|
-
|
|
16027
|
-
|
|
16028
|
-
|
|
16029
|
-
|
|
16030
|
-
|
|
15975
|
+
/**
|
|
15976
|
+
* Creates a new managed {@link TestItem} instance. It can be added into
|
|
15977
|
+
* the {@link TestItem.children} of an existing item, or into the
|
|
15978
|
+
* {@link TestController.items}.
|
|
15979
|
+
*
|
|
15980
|
+
* @param id Identifier for the TestItem. The test item's ID must be unique
|
|
15981
|
+
* in the {@link TestItemCollection} it's added to.
|
|
15982
|
+
* @param label Human-readable label of the test item.
|
|
15983
|
+
* @param uri URI this TestItem is associated with. May be a file or directory.
|
|
15984
|
+
* @stubbed
|
|
15985
|
+
*/
|
|
15986
|
+
createTestItem(id: string, label: string, uri?: Uri): TestItem;
|
|
15987
|
+
|
|
15988
|
+
/**
|
|
15989
|
+
* Marks an item's results as being outdated. This is commonly called when
|
|
15990
|
+
* code or configuration changes and previous results should no longer
|
|
15991
|
+
* be considered relevant. The same logic used to mark results as outdated
|
|
15992
|
+
* may be used to drive {@link TestRunRequest.continuous continuous test runs}.
|
|
15993
|
+
*
|
|
15994
|
+
* If an item is passed to this method, test results for the item and all of
|
|
15995
|
+
* its children will be marked as outdated. If no item is passed, then all
|
|
15996
|
+
* test owned by the TestController will be marked as outdated.
|
|
15997
|
+
*
|
|
15998
|
+
* Any test runs started before the moment this method is called, including
|
|
15999
|
+
* runs which may still be ongoing, will be marked as outdated and deprioritized
|
|
16000
|
+
* in the editor's UI.
|
|
16001
|
+
*
|
|
16002
|
+
* @param item Item to mark as outdated. If undefined, all the controller's items are marked outdated.
|
|
16003
|
+
* @stubbed
|
|
16004
|
+
*/
|
|
16005
|
+
invalidateTestResults(items?: TestItem | readonly TestItem[]): void;
|
|
16006
|
+
|
|
16007
|
+
/**
|
|
16008
|
+
* Unregisters the test controller, disposing of its associated tests
|
|
16009
|
+
* and unpersisted results.
|
|
16010
|
+
* @stubbed
|
|
16011
|
+
*/
|
|
16012
|
+
dispose(): void;
|
|
16013
|
+
}
|
|
16031
16014
|
|
|
16032
16015
|
/**
|
|
16033
|
-
*
|
|
16034
|
-
*
|
|
16016
|
+
* A TestRunRequest is a precursor to a {@link TestRun}, which in turn is
|
|
16017
|
+
* created by passing a request to {@link tests.runTests}. The TestRunRequest
|
|
16018
|
+
* contains information about which tests should be run, which should not be
|
|
16019
|
+
* run, and how they are run (via the {@link TestRunRequest.profile profile}).
|
|
16035
16020
|
*
|
|
16036
|
-
*
|
|
16037
|
-
*
|
|
16021
|
+
* In general, TestRunRequests are created by the editor and pass to
|
|
16022
|
+
* {@link TestRunProfile.runHandler}, however you can also create test
|
|
16023
|
+
* requests and runs outside of the `runHandler`.
|
|
16038
16024
|
*/
|
|
16039
|
-
|
|
16025
|
+
export class TestRunRequest {
|
|
16026
|
+
/**
|
|
16027
|
+
* A filter for specific tests to run. If given, the extension should run
|
|
16028
|
+
* all of the included tests and all their children, excluding any tests
|
|
16029
|
+
* that appear in {@link TestRunRequest.exclude}. If this property is
|
|
16030
|
+
* undefined, then the extension should simply run all tests.
|
|
16031
|
+
*
|
|
16032
|
+
* The process of running tests should resolve the children of any test
|
|
16033
|
+
* items who have not yet been resolved.
|
|
16034
|
+
*/
|
|
16035
|
+
readonly include: readonly TestItem[] | undefined;
|
|
16040
16036
|
|
|
16041
|
-
|
|
16042
|
-
|
|
16043
|
-
|
|
16044
|
-
|
|
16045
|
-
|
|
16046
|
-
|
|
16037
|
+
/**
|
|
16038
|
+
* An array of tests the user has marked as excluded from the test included
|
|
16039
|
+
* in this run; exclusions should apply after inclusions.
|
|
16040
|
+
*
|
|
16041
|
+
* May be omitted if no exclusions were requested. Test controllers should
|
|
16042
|
+
* not run excluded tests or any children of excluded tests.
|
|
16043
|
+
*/
|
|
16044
|
+
readonly exclude: readonly TestItem[] | undefined;
|
|
16047
16045
|
|
|
16048
|
-
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
|
|
16052
|
-
|
|
16046
|
+
/**
|
|
16047
|
+
* The profile used for this request. This will always be defined
|
|
16048
|
+
* for requests issued from the editor UI, though extensions may
|
|
16049
|
+
* programmatically create requests not associated with any profile.
|
|
16050
|
+
*/
|
|
16051
|
+
readonly profile: TestRunProfile | undefined;
|
|
16053
16052
|
|
|
16054
|
-
|
|
16055
|
-
|
|
16056
|
-
|
|
16057
|
-
|
|
16058
|
-
|
|
16059
|
-
*/
|
|
16060
|
-
constructor(include?: readonly TestItem[], exclude?: readonly TestItem[], profile?: TestRunProfile, continuous?: boolean);
|
|
16061
|
-
}
|
|
16053
|
+
/**
|
|
16054
|
+
* Whether the profile should run continuously as source code changes. Only
|
|
16055
|
+
* relevant for profiles that set {@link TestRunProfile.supportsContinuousRun}.
|
|
16056
|
+
*/
|
|
16057
|
+
readonly continuous?: boolean;
|
|
16062
16058
|
|
|
16063
|
-
/**
|
|
16064
|
-
|
|
16065
|
-
|
|
16066
|
-
|
|
16067
|
-
|
|
16068
|
-
|
|
16069
|
-
|
|
16070
|
-
|
|
16071
|
-
* @stubbed
|
|
16072
|
-
*/
|
|
16073
|
-
readonly name: string | undefined;
|
|
16059
|
+
/**
|
|
16060
|
+
* @param include Array of specific tests to run, or undefined to run all tests
|
|
16061
|
+
* @param exclude An array of tests to exclude from the run.
|
|
16062
|
+
* @param profile The run profile used for this request.
|
|
16063
|
+
* @param continuous Whether to run tests continuously as source changes.
|
|
16064
|
+
*/
|
|
16065
|
+
constructor(include?: readonly TestItem[], exclude?: readonly TestItem[], profile?: TestRunProfile, continuous?: boolean);
|
|
16066
|
+
}
|
|
16074
16067
|
|
|
16075
16068
|
/**
|
|
16076
|
-
*
|
|
16077
|
-
* canceled from the UI.
|
|
16078
|
-
* @stubbed
|
|
16069
|
+
* Options given to {@link TestController.runTests}
|
|
16079
16070
|
*/
|
|
16080
|
-
|
|
16071
|
+
export interface TestRun {
|
|
16072
|
+
/**
|
|
16073
|
+
* The human-readable name of the run. This can be used to
|
|
16074
|
+
* disambiguate multiple sets of results in a test run. It is useful if
|
|
16075
|
+
* tests are run across multiple platforms, for example.
|
|
16076
|
+
* @stubbed
|
|
16077
|
+
*/
|
|
16078
|
+
readonly name: string | undefined;
|
|
16081
16079
|
|
|
16082
|
-
|
|
16083
|
-
|
|
16084
|
-
|
|
16085
|
-
|
|
16086
|
-
|
|
16080
|
+
/**
|
|
16081
|
+
* A cancellation token which will be triggered when the test run is
|
|
16082
|
+
* canceled from the UI.
|
|
16083
|
+
* @stubbed
|
|
16084
|
+
*/
|
|
16085
|
+
readonly token: CancellationToken;
|
|
16087
16086
|
|
|
16088
|
-
|
|
16089
|
-
|
|
16090
|
-
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
enqueued(test: TestItem): void;
|
|
16087
|
+
/**
|
|
16088
|
+
* Whether the test run will be persisted across reloads by the editor.
|
|
16089
|
+
* @stubbed
|
|
16090
|
+
*/
|
|
16091
|
+
readonly isPersisted: boolean;
|
|
16094
16092
|
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
|
|
16098
|
-
|
|
16099
|
-
|
|
16100
|
-
|
|
16093
|
+
/**
|
|
16094
|
+
* Indicates a test is queued for later execution.
|
|
16095
|
+
* @param test Test item to update.
|
|
16096
|
+
* @stubbed
|
|
16097
|
+
*/
|
|
16098
|
+
enqueued(test: TestItem): void;
|
|
16101
16099
|
|
|
16102
|
-
|
|
16103
|
-
|
|
16104
|
-
|
|
16105
|
-
|
|
16106
|
-
|
|
16107
|
-
|
|
16100
|
+
/**
|
|
16101
|
+
* Indicates a test has started running.
|
|
16102
|
+
* @param test Test item to update.
|
|
16103
|
+
* @stubbed
|
|
16104
|
+
*/
|
|
16105
|
+
started(test: TestItem): void;
|
|
16108
16106
|
|
|
16109
|
-
|
|
16110
|
-
|
|
16111
|
-
|
|
16112
|
-
|
|
16113
|
-
|
|
16114
|
-
|
|
16115
|
-
* @stubbed
|
|
16116
|
-
*/
|
|
16117
|
-
failed(test: TestItem, message: TestMessage | readonly TestMessage[], duration?: number): void;
|
|
16107
|
+
/**
|
|
16108
|
+
* Indicates a test has been skipped.
|
|
16109
|
+
* @param test Test item to update.
|
|
16110
|
+
* @stubbed
|
|
16111
|
+
*/
|
|
16112
|
+
skipped(test: TestItem): void;
|
|
16118
16113
|
|
|
16119
|
-
|
|
16120
|
-
|
|
16121
|
-
|
|
16122
|
-
|
|
16123
|
-
|
|
16124
|
-
|
|
16125
|
-
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
*/
|
|
16129
|
-
errored(test: TestItem, message: TestMessage | readonly TestMessage[], duration?: number): void;
|
|
16114
|
+
/**
|
|
16115
|
+
* Indicates a test has failed. You should pass one or more
|
|
16116
|
+
* {@link TestMessage TestMessages} to describe the failure.
|
|
16117
|
+
* @param test Test item to update.
|
|
16118
|
+
* @param message Messages associated with the test failure.
|
|
16119
|
+
* @param duration How long the test took to execute, in milliseconds.
|
|
16120
|
+
* @stubbed
|
|
16121
|
+
*/
|
|
16122
|
+
failed(test: TestItem, message: TestMessage | readonly TestMessage[], duration?: number): void;
|
|
16130
16123
|
|
|
16131
|
-
|
|
16132
|
-
|
|
16133
|
-
|
|
16134
|
-
|
|
16135
|
-
|
|
16136
|
-
|
|
16137
|
-
|
|
16124
|
+
/**
|
|
16125
|
+
* Indicates a test has errored. You should pass one or more
|
|
16126
|
+
* {@link TestMessage TestMessages} to describe the failure. This differs
|
|
16127
|
+
* from the "failed" state in that it indicates a test that couldn't be
|
|
16128
|
+
* executed at all, from a compilation error for example.
|
|
16129
|
+
* @param test Test item to update.
|
|
16130
|
+
* @param message Messages associated with the test failure.
|
|
16131
|
+
* @param duration How long the test took to execute, in milliseconds.
|
|
16132
|
+
* @stubbed
|
|
16133
|
+
*/
|
|
16134
|
+
errored(test: TestItem, message: TestMessage | readonly TestMessage[], duration?: number): void;
|
|
16138
16135
|
|
|
16139
|
-
|
|
16140
|
-
|
|
16141
|
-
|
|
16142
|
-
|
|
16143
|
-
|
|
16144
|
-
|
|
16145
|
-
|
|
16146
|
-
* location.
|
|
16147
|
-
* @param test Test item to associate the output with.
|
|
16148
|
-
* @stubbed
|
|
16149
|
-
*/
|
|
16150
|
-
appendOutput(output: string, location?: Location, test?: TestItem): void;
|
|
16136
|
+
/**
|
|
16137
|
+
* Indicates a test has passed.
|
|
16138
|
+
* @param test Test item to update.
|
|
16139
|
+
* @param duration How long the test took to execute, in milliseconds.
|
|
16140
|
+
* @stubbed
|
|
16141
|
+
*/
|
|
16142
|
+
passed(test: TestItem, duration?: number): void;
|
|
16151
16143
|
|
|
16152
|
-
|
|
16153
|
-
|
|
16154
|
-
|
|
16155
|
-
|
|
16156
|
-
|
|
16157
|
-
|
|
16158
|
-
|
|
16144
|
+
/**
|
|
16145
|
+
* Appends raw output from the test runner. On the user's request, the
|
|
16146
|
+
* output will be displayed in a terminal. ANSI escape sequences,
|
|
16147
|
+
* such as colors and text styles, are supported.
|
|
16148
|
+
*
|
|
16149
|
+
* @param output Output text to append.
|
|
16150
|
+
* @param location Indicate that the output was logged at the given
|
|
16151
|
+
* location.
|
|
16152
|
+
* @param test Test item to associate the output with.
|
|
16153
|
+
* @stubbed
|
|
16154
|
+
*/
|
|
16155
|
+
appendOutput(output: string, location?: Location, test?: TestItem): void;
|
|
16159
16156
|
|
|
16160
|
-
/**
|
|
16161
|
-
|
|
16162
|
-
|
|
16163
|
-
|
|
16164
|
-
|
|
16165
|
-
|
|
16166
|
-
|
|
16167
|
-
* @stubbed
|
|
16168
|
-
*/
|
|
16169
|
-
readonly size: number;
|
|
16157
|
+
/**
|
|
16158
|
+
* Signals that the end of the test run. Any tests included in the run whose
|
|
16159
|
+
* states have not been updated will have their state reset.
|
|
16160
|
+
* @stubbed
|
|
16161
|
+
*/
|
|
16162
|
+
end(): void;
|
|
16163
|
+
}
|
|
16170
16164
|
|
|
16171
16165
|
/**
|
|
16172
|
-
*
|
|
16173
|
-
* @
|
|
16174
|
-
* @stubbed
|
|
16166
|
+
* Collection of test items, found in {@link TestItem.children} and
|
|
16167
|
+
* {@link TestController.items}.
|
|
16175
16168
|
*/
|
|
16176
|
-
|
|
16169
|
+
export interface TestItemCollection extends Iterable<[id: string, testItem: TestItem]> {
|
|
16170
|
+
/**
|
|
16171
|
+
* Gets the number of items in the collection.
|
|
16172
|
+
* @stubbed
|
|
16173
|
+
*/
|
|
16174
|
+
readonly size: number;
|
|
16177
16175
|
|
|
16178
|
-
|
|
16179
|
-
|
|
16180
|
-
|
|
16181
|
-
|
|
16182
|
-
|
|
16183
|
-
|
|
16184
|
-
*/
|
|
16185
|
-
forEach(callback: (item: TestItem, collection: TestItemCollection) => unknown, thisArg?: any): void;
|
|
16176
|
+
/**
|
|
16177
|
+
* Replaces the items stored by the collection.
|
|
16178
|
+
* @param items Items to store.
|
|
16179
|
+
* @stubbed
|
|
16180
|
+
*/
|
|
16181
|
+
replace(items: readonly TestItem[]): void;
|
|
16186
16182
|
|
|
16187
|
-
|
|
16188
|
-
|
|
16189
|
-
|
|
16190
|
-
|
|
16191
|
-
|
|
16192
|
-
|
|
16193
|
-
|
|
16183
|
+
/**
|
|
16184
|
+
* Iterate over each entry in this collection.
|
|
16185
|
+
*
|
|
16186
|
+
* @param callback Function to execute for each entry.
|
|
16187
|
+
* @param thisArg The `this` context used when invoking the handler function.
|
|
16188
|
+
* @stubbed
|
|
16189
|
+
*/
|
|
16190
|
+
forEach(callback: (item: TestItem, collection: TestItemCollection) => unknown, thisArg?: any): void;
|
|
16194
16191
|
|
|
16195
|
-
|
|
16196
|
-
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
|
|
16200
|
-
|
|
16192
|
+
/**
|
|
16193
|
+
* Adds the test item to the children. If an item with the same ID already
|
|
16194
|
+
* exists, it'll be replaced.
|
|
16195
|
+
* @param item Item to add.
|
|
16196
|
+
* @stubbed
|
|
16197
|
+
*/
|
|
16198
|
+
add(item: TestItem): void;
|
|
16201
16199
|
|
|
16202
|
-
|
|
16203
|
-
|
|
16204
|
-
|
|
16205
|
-
|
|
16206
|
-
|
|
16207
|
-
|
|
16208
|
-
get(itemId: string): TestItem | undefined;
|
|
16209
|
-
}
|
|
16200
|
+
/**
|
|
16201
|
+
* Removes a single test item from the collection.
|
|
16202
|
+
* @param itemId Item ID to delete.
|
|
16203
|
+
* @stubbed
|
|
16204
|
+
*/
|
|
16205
|
+
delete(itemId: string): void;
|
|
16210
16206
|
|
|
16211
|
-
/**
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16219
|
-
* Identifier for the `TestItem`. This is used to correlate
|
|
16220
|
-
* test results and tests in the document with those in the workspace
|
|
16221
|
-
* (test explorer). This cannot change for the lifetime of the `TestItem`,
|
|
16222
|
-
* and must be unique among its parent's direct children.
|
|
16223
|
-
* @stubbed
|
|
16224
|
-
*/
|
|
16225
|
-
readonly id: string;
|
|
16207
|
+
/**
|
|
16208
|
+
* Efficiently gets a test item by ID, if it exists, in the children.
|
|
16209
|
+
* @param itemId Item ID to get.
|
|
16210
|
+
* @returns The found item or undefined if it does not exist.
|
|
16211
|
+
* @stubbed
|
|
16212
|
+
*/
|
|
16213
|
+
get(itemId: string): TestItem | undefined;
|
|
16214
|
+
}
|
|
16226
16215
|
|
|
16227
16216
|
/**
|
|
16228
|
-
*
|
|
16229
|
-
*
|
|
16217
|
+
* An item shown in the "test explorer" view.
|
|
16218
|
+
*
|
|
16219
|
+
* A `TestItem` can represent either a test suite or a test itself, since
|
|
16220
|
+
* they both have similar capabilities.
|
|
16230
16221
|
*/
|
|
16231
|
-
|
|
16222
|
+
export interface TestItem {
|
|
16223
|
+
/**
|
|
16224
|
+
* Identifier for the `TestItem`. This is used to correlate
|
|
16225
|
+
* test results and tests in the document with those in the workspace
|
|
16226
|
+
* (test explorer). This cannot change for the lifetime of the `TestItem`,
|
|
16227
|
+
* and must be unique among its parent's direct children.
|
|
16228
|
+
* @stubbed
|
|
16229
|
+
*/
|
|
16230
|
+
readonly id: string;
|
|
16232
16231
|
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
readonly children: TestItemCollection;
|
|
16232
|
+
/**
|
|
16233
|
+
* URI this `TestItem` is associated with. May be a file or directory.
|
|
16234
|
+
* @stubbed
|
|
16235
|
+
*/
|
|
16236
|
+
readonly uri: Uri | undefined;
|
|
16239
16237
|
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
|
|
16243
|
-
|
|
16244
|
-
|
|
16245
|
-
|
|
16246
|
-
readonly parent: TestItem | undefined;
|
|
16238
|
+
/**
|
|
16239
|
+
* The children of this test item. For a test suite, this may contain the
|
|
16240
|
+
* individual test cases or nested suites.
|
|
16241
|
+
* @stubbed
|
|
16242
|
+
*/
|
|
16243
|
+
readonly children: TestItemCollection;
|
|
16247
16244
|
|
|
16248
|
-
|
|
16249
|
-
|
|
16250
|
-
|
|
16251
|
-
|
|
16252
|
-
|
|
16253
|
-
|
|
16245
|
+
/**
|
|
16246
|
+
* The parent of this item. It's set automatically, and is undefined
|
|
16247
|
+
* top-level items in the {@link TestController.items} and for items that
|
|
16248
|
+
* aren't yet included in another item's {@link TestItem.children children}.
|
|
16249
|
+
* @stubbed
|
|
16250
|
+
*/
|
|
16251
|
+
readonly parent: TestItem | undefined;
|
|
16254
16252
|
|
|
16255
|
-
|
|
16256
|
-
|
|
16257
|
-
|
|
16258
|
-
|
|
16259
|
-
|
|
16260
|
-
|
|
16261
|
-
*
|
|
16262
|
-
* Default to `false`.
|
|
16263
|
-
* @stubbed
|
|
16264
|
-
*/
|
|
16265
|
-
canResolveChildren: boolean;
|
|
16253
|
+
/**
|
|
16254
|
+
* Tags associated with this test item. May be used in combination with
|
|
16255
|
+
* {@link TestRunProfile.tags}, or simply as an organizational feature.
|
|
16256
|
+
* @stubbed
|
|
16257
|
+
*/
|
|
16258
|
+
tags: readonly TestTag[];
|
|
16266
16259
|
|
|
16267
|
-
|
|
16268
|
-
|
|
16269
|
-
|
|
16270
|
-
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
|
|
16274
|
-
|
|
16260
|
+
/**
|
|
16261
|
+
* Indicates whether this test item may have children discovered by resolving.
|
|
16262
|
+
*
|
|
16263
|
+
* If true, this item is shown as expandable in the Test Explorer view and
|
|
16264
|
+
* expanding the item will cause {@link TestController.resolveHandler}
|
|
16265
|
+
* to be invoked with the item.
|
|
16266
|
+
*
|
|
16267
|
+
* Default to `false`.
|
|
16268
|
+
* @stubbed
|
|
16269
|
+
*/
|
|
16270
|
+
canResolveChildren: boolean;
|
|
16275
16271
|
|
|
16276
|
-
|
|
16277
|
-
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
|
|
16272
|
+
/**
|
|
16273
|
+
* Controls whether the item is shown as "busy" in the Test Explorer view.
|
|
16274
|
+
* This is useful for showing status while discovering children.
|
|
16275
|
+
*
|
|
16276
|
+
* Defaults to `false`.
|
|
16277
|
+
* @stubbed
|
|
16278
|
+
*/
|
|
16279
|
+
busy: boolean;
|
|
16281
16280
|
|
|
16282
|
-
|
|
16283
|
-
|
|
16284
|
-
|
|
16285
|
-
|
|
16286
|
-
|
|
16281
|
+
/**
|
|
16282
|
+
* Display name describing the test case.
|
|
16283
|
+
* @stubbed
|
|
16284
|
+
*/
|
|
16285
|
+
label: string;
|
|
16287
16286
|
|
|
16288
|
-
|
|
16289
|
-
|
|
16290
|
-
|
|
16291
|
-
|
|
16292
|
-
|
|
16293
|
-
*/
|
|
16294
|
-
sortText?: string | undefined;
|
|
16287
|
+
/**
|
|
16288
|
+
* Optional description that appears next to the label.
|
|
16289
|
+
* @stubbed
|
|
16290
|
+
*/
|
|
16291
|
+
description?: string;
|
|
16295
16292
|
|
|
16296
|
-
|
|
16297
|
-
|
|
16298
|
-
|
|
16299
|
-
|
|
16300
|
-
|
|
16301
|
-
|
|
16302
|
-
|
|
16293
|
+
/**
|
|
16294
|
+
* A string that should be used when comparing this item
|
|
16295
|
+
* with other items. When `falsy` the {@link TestItem.label label}
|
|
16296
|
+
* is used.
|
|
16297
|
+
* @stubbed
|
|
16298
|
+
*/
|
|
16299
|
+
sortText?: string | undefined;
|
|
16303
16300
|
|
|
16304
|
-
|
|
16305
|
-
|
|
16306
|
-
|
|
16307
|
-
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16311
|
-
error: string | MarkdownString | undefined;
|
|
16312
|
-
}
|
|
16301
|
+
/**
|
|
16302
|
+
* Location of the test item in its {@link TestItem.uri uri}.
|
|
16303
|
+
*
|
|
16304
|
+
* This is only meaningful if the `uri` points to a file.
|
|
16305
|
+
* @stubbed
|
|
16306
|
+
*/
|
|
16307
|
+
range: Range | undefined;
|
|
16313
16308
|
|
|
16314
|
-
/**
|
|
16315
|
-
|
|
16316
|
-
|
|
16317
|
-
|
|
16318
|
-
|
|
16319
|
-
|
|
16320
|
-
|
|
16321
|
-
|
|
16322
|
-
|
|
16309
|
+
/**
|
|
16310
|
+
* Optional error encountered while loading the test.
|
|
16311
|
+
*
|
|
16312
|
+
* Note that this is not a test result and should only be used to represent errors in
|
|
16313
|
+
* test discovery, such as syntax errors.
|
|
16314
|
+
* @stubbed
|
|
16315
|
+
*/
|
|
16316
|
+
error: string | MarkdownString | undefined;
|
|
16317
|
+
}
|
|
16323
16318
|
|
|
16324
16319
|
/**
|
|
16325
|
-
*
|
|
16320
|
+
* Message associated with the test state. Can be linked to a specific
|
|
16321
|
+
* source range -- useful for assertion failures, for example.
|
|
16326
16322
|
*/
|
|
16327
|
-
|
|
16323
|
+
export class TestMessage {
|
|
16324
|
+
/**
|
|
16325
|
+
* Human-readable message text to display.
|
|
16326
|
+
*/
|
|
16327
|
+
message: string | MarkdownString;
|
|
16328
16328
|
|
|
16329
|
-
|
|
16330
|
-
|
|
16331
|
-
|
|
16332
|
-
|
|
16329
|
+
/**
|
|
16330
|
+
* Expected test output. If given with {@link TestMessage.actualOutput actualOutput }, a diff view will be shown.
|
|
16331
|
+
*/
|
|
16332
|
+
expectedOutput?: string;
|
|
16333
16333
|
|
|
16334
|
-
|
|
16335
|
-
|
|
16336
|
-
|
|
16337
|
-
|
|
16334
|
+
/**
|
|
16335
|
+
* Actual test output. If given with {@link TestMessage.expectedOutput expectedOutput }, a diff view will be shown.
|
|
16336
|
+
*/
|
|
16337
|
+
actualOutput?: string;
|
|
16338
16338
|
|
|
16339
|
-
|
|
16340
|
-
|
|
16341
|
-
|
|
16342
|
-
|
|
16343
|
-
|
|
16344
|
-
|
|
16345
|
-
|
|
16339
|
+
/**
|
|
16340
|
+
* Associated file location.
|
|
16341
|
+
*/
|
|
16342
|
+
location?: Location;
|
|
16343
|
+
|
|
16344
|
+
/**
|
|
16345
|
+
* Creates a new TestMessage that will present as a diff in the editor.
|
|
16346
|
+
* @param message Message to display to the user.
|
|
16347
|
+
* @param expected Expected output.
|
|
16348
|
+
* @param actual Actual output.
|
|
16349
|
+
*/
|
|
16350
|
+
static diff(message: string | MarkdownString, expected: string, actual: string): TestMessage;
|
|
16351
|
+
|
|
16352
|
+
/**
|
|
16353
|
+
* Creates a new TestMessage instance.
|
|
16354
|
+
* @param message The message to show to the user.
|
|
16355
|
+
*/
|
|
16356
|
+
constructor(message: string | MarkdownString);
|
|
16357
|
+
}
|
|
16346
16358
|
|
|
16347
16359
|
/**
|
|
16348
|
-
*
|
|
16349
|
-
*
|
|
16360
|
+
* Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
|
|
16361
|
+
* and others. This API makes no assumption about what promise library is being used which
|
|
16362
|
+
* enables reusing existing code without migrating to a specific promise implementation. Still,
|
|
16363
|
+
* we recommend the use of native promises which are available in this editor.
|
|
16350
16364
|
*/
|
|
16351
|
-
|
|
16352
|
-
|
|
16365
|
+
interface Thenable<T> {
|
|
16366
|
+
/**
|
|
16367
|
+
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
|
16368
|
+
* @param onfulfilled The callback to execute when the Promise is resolved.
|
|
16369
|
+
* @param onrejected The callback to execute when the Promise is rejected.
|
|
16370
|
+
* @returns A Promise for the completion of which ever callback is executed.
|
|
16371
|
+
*/
|
|
16372
|
+
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
|
|
16373
|
+
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
|
|
16374
|
+
}
|
|
16353
16375
|
|
|
16354
|
-
/**
|
|
16355
|
-
* Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
|
|
16356
|
-
* and others. This API makes no assumption about what promise library is being used which
|
|
16357
|
-
* enables reusing existing code without migrating to a specific promise implementation. Still,
|
|
16358
|
-
* we recommend the use of native promises which are available in this editor.
|
|
16359
|
-
*/
|
|
16360
|
-
interface Thenable<T> {
|
|
16361
|
-
/**
|
|
16362
|
-
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
|
16363
|
-
* @param onfulfilled The callback to execute when the Promise is resolved.
|
|
16364
|
-
* @param onrejected The callback to execute when the Promise is rejected.
|
|
16365
|
-
* @returns A Promise for the completion of which ever callback is executed.
|
|
16366
|
-
*/
|
|
16367
|
-
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
|
|
16368
|
-
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
|
|
16369
16376
|
}
|
|
16370
|
-
|