@theia/plugin 1.34.2 → 1.36.0-next.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/theia-proposed.d.ts +34 -0
- package/src/theia.d.ts +445 -286
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0-next.21+be025fcc0",
|
|
4
4
|
"description": "Theia - Plugin API",
|
|
5
5
|
"types": "./src/theia.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"watch": "theiaext watch"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@theia/ext-scripts": "1.
|
|
30
|
+
"@theia/ext-scripts": "1.35.0"
|
|
31
31
|
},
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "be025fcc0dc20d3ee81bd882eac4d6c398093d33"
|
|
36
36
|
}
|
package/src/theia-proposed.d.ts
CHANGED
|
@@ -608,6 +608,40 @@ export module '@theia/plugin' {
|
|
|
608
608
|
export function registerTimelineProvider(scheme: string | string[], provider: TimelineProvider): Disposable;
|
|
609
609
|
}
|
|
610
610
|
|
|
611
|
+
// Copied from https://github.com/microsoft/vscode/blob/ad4470522ecd858cfaf53a87c2702d7a40946ba1/src/vscode-dts/vscode.proposed.extensionsAny.d.ts
|
|
612
|
+
// https://github.com/microsoft/vscode/issues/145307
|
|
613
|
+
|
|
614
|
+
export interface Extension<T> {
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* `true` when the extension is associated to another extension host.
|
|
618
|
+
*
|
|
619
|
+
* *Note* that an extension from another extension host cannot export
|
|
620
|
+
* API, e.g {@link Extension.exports its exports} are always `undefined`.
|
|
621
|
+
*/
|
|
622
|
+
readonly isFromDifferentExtensionHost: boolean;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export namespace extensions {
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Get an extension by its full identifier in the form of: `publisher.name`.
|
|
629
|
+
*
|
|
630
|
+
* @param extensionId An extension identifier.
|
|
631
|
+
* @param includeDifferentExtensionHosts Include extensions from different extension host
|
|
632
|
+
* @return An extension or `undefined`.
|
|
633
|
+
*/
|
|
634
|
+
export function getExtension<T = any>(extensionId: string, includeDifferentExtensionHosts: boolean): Extension<T> | undefined;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* All extensions across all extension hosts.
|
|
638
|
+
*
|
|
639
|
+
* @see {@link Extension.isFromDifferentExtensionHost}
|
|
640
|
+
*/
|
|
641
|
+
export const allAcrossExtensionHosts: readonly Extension<void>[];
|
|
642
|
+
|
|
643
|
+
}
|
|
644
|
+
|
|
611
645
|
// #endregion
|
|
612
646
|
}
|
|
613
647
|
|
package/src/theia.d.ts
CHANGED
|
@@ -5653,6 +5653,103 @@ export module '@theia/plugin' {
|
|
|
5653
5653
|
report(value: T): void;
|
|
5654
5654
|
}
|
|
5655
5655
|
|
|
5656
|
+
/**
|
|
5657
|
+
* A file associated with a {@linkcode DataTransferItem}.
|
|
5658
|
+
*/
|
|
5659
|
+
export interface DataTransferFile {
|
|
5660
|
+
/**
|
|
5661
|
+
* The name of the file.
|
|
5662
|
+
*/
|
|
5663
|
+
readonly name: string;
|
|
5664
|
+
|
|
5665
|
+
/**
|
|
5666
|
+
* The full file path of the file.
|
|
5667
|
+
*
|
|
5668
|
+
* May be `undefined` on web.
|
|
5669
|
+
*/
|
|
5670
|
+
readonly uri?: Uri;
|
|
5671
|
+
|
|
5672
|
+
/**
|
|
5673
|
+
* The full file contents of the file.
|
|
5674
|
+
*/
|
|
5675
|
+
data(): Thenable<Uint8Array>;
|
|
5676
|
+
}
|
|
5677
|
+
|
|
5678
|
+
/**
|
|
5679
|
+
* Encapsulates data transferred during drag and drop operations.
|
|
5680
|
+
*/
|
|
5681
|
+
export class DataTransferItem {
|
|
5682
|
+
/**
|
|
5683
|
+
* Get a string representation of this item.
|
|
5684
|
+
*
|
|
5685
|
+
* If {@linkcode DataTransferItem.value} is an object, this returns the result of json stringifying {@linkcode DataTransferItem.value} value.
|
|
5686
|
+
*/
|
|
5687
|
+
asString(): Thenable<string>;
|
|
5688
|
+
|
|
5689
|
+
/**
|
|
5690
|
+
* Try getting the {@link DataTransferFile file} associated with this data transfer item.
|
|
5691
|
+
*
|
|
5692
|
+
* Note that the file object is only valid for the scope of the drag and drop operation.
|
|
5693
|
+
*
|
|
5694
|
+
* @returns The file for the data transfer or `undefined` if the item is either not a file or the
|
|
5695
|
+
* file data cannot be accessed.
|
|
5696
|
+
*/
|
|
5697
|
+
asFile(): DataTransferFile | undefined;
|
|
5698
|
+
|
|
5699
|
+
/**
|
|
5700
|
+
* Custom data stored on this item.
|
|
5701
|
+
*
|
|
5702
|
+
* You can use `value` to share data across operations. The original object can be retrieved so long as the extension that
|
|
5703
|
+
* created the `DataTransferItem` runs in the same extension host.
|
|
5704
|
+
*/
|
|
5705
|
+
readonly value: any;
|
|
5706
|
+
|
|
5707
|
+
/**
|
|
5708
|
+
* @param value Custom data stored on this item. Can be retrieved using {@linkcode DataTransferItem.value}.
|
|
5709
|
+
*/
|
|
5710
|
+
constructor(value: any);
|
|
5711
|
+
}
|
|
5712
|
+
|
|
5713
|
+
/**
|
|
5714
|
+
* A map containing a mapping of the mime type of the corresponding transferred data.
|
|
5715
|
+
*
|
|
5716
|
+
* Drag and drop controllers that implement {@link TreeDragAndDropController.handleDrag `handleDrag`} can add additional mime types to the
|
|
5717
|
+
* data transfer. These additional mime types will only be included in the `handleDrop` when the the drag was initiated from
|
|
5718
|
+
* an element in the same drag and drop controller.
|
|
5719
|
+
*/
|
|
5720
|
+
export class DataTransfer implements Iterable<[mimeType: string, item: DataTransferItem]> {
|
|
5721
|
+
/**
|
|
5722
|
+
* Retrieves the data transfer item for a given mime type.
|
|
5723
|
+
*
|
|
5724
|
+
* @param mimeType The mime type to get the data transfer item for, such as `text/plain` or `image/png`.
|
|
5725
|
+
*
|
|
5726
|
+
* Special mime types:
|
|
5727
|
+
* - `text/uri-list` — A string with `toString()`ed Uris separated by `\r\n`. To specify a cursor position in the file,
|
|
5728
|
+
* set the Uri's fragment to `L3,5`, where 3 is the line number and 5 is the column number.
|
|
5729
|
+
*/
|
|
5730
|
+
get(mimeType: string): DataTransferItem | undefined;
|
|
5731
|
+
|
|
5732
|
+
/**
|
|
5733
|
+
* Sets a mime type to data transfer item mapping.
|
|
5734
|
+
* @param mimeType The mime type to set the data for.
|
|
5735
|
+
* @param value The data transfer item for the given mime type.
|
|
5736
|
+
*/
|
|
5737
|
+
set(mimeType: string, value: DataTransferItem): void;
|
|
5738
|
+
|
|
5739
|
+
/**
|
|
5740
|
+
* Allows iteration through the data transfer items.
|
|
5741
|
+
*
|
|
5742
|
+
* @param callbackfn Callback for iteration through the data transfer items.
|
|
5743
|
+
* @param thisArg The `this` context used when invoking the handler function.
|
|
5744
|
+
*/
|
|
5745
|
+
forEach(callbackfn: (item: DataTransferItem, mimeType: string, dataTransfer: DataTransfer) => void, thisArg?: any): void;
|
|
5746
|
+
|
|
5747
|
+
/**
|
|
5748
|
+
* Get a new iterator with the `[mime, item]` pairs for each element in this data transfer.
|
|
5749
|
+
*/
|
|
5750
|
+
[Symbol.iterator](): IterableIterator<[mimeType: string, item: DataTransferItem]>;
|
|
5751
|
+
}
|
|
5752
|
+
|
|
5656
5753
|
/**
|
|
5657
5754
|
* Options for creating a {@link TreeView TreeView}
|
|
5658
5755
|
*/
|
|
@@ -7108,9 +7205,10 @@ export module '@theia/plugin' {
|
|
|
7108
7205
|
* not be attempted, when a single edit fails.
|
|
7109
7206
|
*
|
|
7110
7207
|
* @param edit A workspace edit.
|
|
7208
|
+
* @param metadata Optional {@link WorkspaceEditMetadata metadata} for the edit.
|
|
7111
7209
|
* @return A thenable that resolves when the edit could be applied.
|
|
7112
7210
|
*/
|
|
7113
|
-
export function applyEdit(edit: WorkspaceEdit): Thenable<boolean>;
|
|
7211
|
+
export function applyEdit(edit: WorkspaceEdit, metadata?: WorkspaceEditMetadata): Thenable<boolean>;
|
|
7114
7212
|
|
|
7115
7213
|
/**
|
|
7116
7214
|
* Register a filesystem provider for a given scheme, e.g. `ftp`.
|
|
@@ -9652,6 +9750,16 @@ export module '@theia/plugin' {
|
|
|
9652
9750
|
iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
|
|
9653
9751
|
}
|
|
9654
9752
|
|
|
9753
|
+
/**
|
|
9754
|
+
* Additional data about a workspace edit.
|
|
9755
|
+
*/
|
|
9756
|
+
export interface WorkspaceEditMetadata {
|
|
9757
|
+
/**
|
|
9758
|
+
* Signal to the editor that this edit is a refactoring.
|
|
9759
|
+
*/
|
|
9760
|
+
isRefactoring?: boolean;
|
|
9761
|
+
}
|
|
9762
|
+
|
|
9655
9763
|
/**
|
|
9656
9764
|
* A workspace edit is a collection of textual and files changes for
|
|
9657
9765
|
* multiple resources and documents.
|
|
@@ -10347,6 +10455,16 @@ export module '@theia/plugin' {
|
|
|
10347
10455
|
*/
|
|
10348
10456
|
export function registerDefinitionProvider(selector: DocumentSelector, provider: DefinitionProvider): Disposable;
|
|
10349
10457
|
|
|
10458
|
+
/**
|
|
10459
|
+
* Registers a new {@link DocumentDropEditProvider}.
|
|
10460
|
+
*
|
|
10461
|
+
* @param selector A selector that defines the documents this provider applies to.
|
|
10462
|
+
* @param provider A drop provider.
|
|
10463
|
+
*
|
|
10464
|
+
* @return A {@link Disposable} that unregisters this provider when disposed of.
|
|
10465
|
+
*/
|
|
10466
|
+
export function registerDocumentDropEditProvider(selector: DocumentSelector, provider: DocumentDropEditProvider): Disposable;
|
|
10467
|
+
|
|
10350
10468
|
/**
|
|
10351
10469
|
* Register a declaration provider.
|
|
10352
10470
|
*
|
|
@@ -13208,6 +13326,48 @@ export module '@theia/plugin' {
|
|
|
13208
13326
|
provideLinkedEditingRanges(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<LinkedEditingRanges>;
|
|
13209
13327
|
}
|
|
13210
13328
|
|
|
13329
|
+
/**
|
|
13330
|
+
* An edit operation applied {@link DocumentDropEditProvider on drop}.
|
|
13331
|
+
*/
|
|
13332
|
+
export class DocumentDropEdit {
|
|
13333
|
+
/**
|
|
13334
|
+
* The text or snippet to insert at the drop location.
|
|
13335
|
+
*/
|
|
13336
|
+
insertText: string | SnippetString;
|
|
13337
|
+
|
|
13338
|
+
/**
|
|
13339
|
+
* An optional additional edit to apply on drop.
|
|
13340
|
+
*/
|
|
13341
|
+
additionalEdit?: WorkspaceEdit;
|
|
13342
|
+
|
|
13343
|
+
/**
|
|
13344
|
+
* @param insertText The text or snippet to insert at the drop location.
|
|
13345
|
+
*/
|
|
13346
|
+
constructor(insertText: string | SnippetString);
|
|
13347
|
+
}
|
|
13348
|
+
|
|
13349
|
+
/**
|
|
13350
|
+
* Provider which handles dropping of resources into a text editor.
|
|
13351
|
+
*
|
|
13352
|
+
* This allows users to drag and drop resources (including resources from external apps) into the editor. While dragging
|
|
13353
|
+
* and dropping files, users can hold down `shift` to drop the file into the editor instead of opening it.
|
|
13354
|
+
* Requires `editor.dropIntoEditor.enabled` to be on.
|
|
13355
|
+
*/
|
|
13356
|
+
export interface DocumentDropEditProvider {
|
|
13357
|
+
/**
|
|
13358
|
+
* Provide edits which inserts the content being dragged and dropped into the document.
|
|
13359
|
+
*
|
|
13360
|
+
* @param document The document in which the drop occurred.
|
|
13361
|
+
* @param position The position in the document where the drop occurred.
|
|
13362
|
+
* @param dataTransfer A {@link DataTransfer} object that holds data about what is being dragged and dropped.
|
|
13363
|
+
* @param token A cancellation token.
|
|
13364
|
+
*
|
|
13365
|
+
* @return A {@link DocumentDropEdit} or a thenable that resolves to such. The lack of a result can be
|
|
13366
|
+
* signaled by returning `undefined` or `null`.
|
|
13367
|
+
*/
|
|
13368
|
+
provideDocumentDropEdits(document: TextDocument, position: Position, dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentDropEdit>;
|
|
13369
|
+
}
|
|
13370
|
+
|
|
13211
13371
|
/**
|
|
13212
13372
|
* Represents a session of a currently logged in user.
|
|
13213
13373
|
*/
|
|
@@ -13471,291 +13631,290 @@ export module '@theia/plugin' {
|
|
|
13471
13631
|
/**
|
|
13472
13632
|
* The tab represents a single text based resource.
|
|
13473
13633
|
*/
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
|
|
13487
|
-
|
|
13488
|
-
|
|
13489
|
-
|
|
13490
|
-
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
|
|
13497
|
-
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
|
|
13504
|
-
|
|
13505
|
-
|
|
13506
|
-
|
|
13507
|
-
|
|
13508
|
-
|
|
13509
|
-
|
|
13510
|
-
|
|
13511
|
-
|
|
13512
|
-
|
|
13513
|
-
|
|
13514
|
-
|
|
13515
|
-
|
|
13516
|
-
|
|
13517
|
-
|
|
13518
|
-
|
|
13519
|
-
|
|
13520
|
-
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13524
|
-
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
|
|
13547
|
-
|
|
13548
|
-
|
|
13549
|
-
|
|
13550
|
-
|
|
13551
|
-
|
|
13552
|
-
|
|
13553
|
-
|
|
13554
|
-
|
|
13555
|
-
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
|
|
13559
|
-
|
|
13560
|
-
|
|
13561
|
-
|
|
13562
|
-
|
|
13563
|
-
|
|
13564
|
-
|
|
13565
|
-
|
|
13566
|
-
|
|
13567
|
-
|
|
13568
|
-
|
|
13569
|
-
|
|
13570
|
-
|
|
13571
|
-
|
|
13572
|
-
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13584
|
-
|
|
13585
|
-
|
|
13586
|
-
|
|
13587
|
-
|
|
13588
|
-
|
|
13589
|
-
|
|
13590
|
-
|
|
13591
|
-
|
|
13592
|
-
|
|
13593
|
-
|
|
13594
|
-
|
|
13595
|
-
|
|
13596
|
-
|
|
13597
|
-
|
|
13598
|
-
|
|
13599
|
-
|
|
13600
|
-
|
|
13601
|
-
|
|
13602
|
-
|
|
13603
|
-
|
|
13604
|
-
|
|
13605
|
-
|
|
13606
|
-
|
|
13607
|
-
|
|
13608
|
-
|
|
13609
|
-
|
|
13610
|
-
|
|
13611
|
-
|
|
13612
|
-
|
|
13613
|
-
|
|
13614
|
-
|
|
13615
|
-
|
|
13616
|
-
|
|
13617
|
-
|
|
13618
|
-
|
|
13619
|
-
|
|
13620
|
-
|
|
13621
|
-
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
|
|
13626
|
-
|
|
13627
|
-
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
|
|
13631
|
-
|
|
13632
|
-
|
|
13633
|
-
|
|
13634
|
-
|
|
13635
|
-
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
|
|
13654
|
-
|
|
13655
|
-
|
|
13656
|
-
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
|
|
13671
|
-
|
|
13672
|
-
|
|
13673
|
-
|
|
13674
|
-
|
|
13675
|
-
|
|
13676
|
-
|
|
13677
|
-
|
|
13678
|
-
|
|
13679
|
-
|
|
13680
|
-
|
|
13681
|
-
|
|
13682
|
-
|
|
13683
|
-
|
|
13684
|
-
|
|
13685
|
-
|
|
13686
|
-
|
|
13687
|
-
|
|
13688
|
-
|
|
13689
|
-
|
|
13690
|
-
|
|
13691
|
-
|
|
13692
|
-
|
|
13693
|
-
|
|
13694
|
-
|
|
13695
|
-
|
|
13696
|
-
|
|
13697
|
-
|
|
13698
|
-
|
|
13699
|
-
|
|
13700
|
-
|
|
13701
|
-
|
|
13702
|
-
|
|
13703
|
-
|
|
13704
|
-
|
|
13705
|
-
|
|
13706
|
-
|
|
13707
|
-
|
|
13708
|
-
|
|
13709
|
-
|
|
13710
|
-
|
|
13711
|
-
|
|
13712
|
-
|
|
13713
|
-
|
|
13714
|
-
|
|
13715
|
-
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13751
|
-
|
|
13752
|
-
|
|
13753
|
-
|
|
13754
|
-
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
|
|
13758
|
-
}
|
|
13634
|
+
export class TabInputText {
|
|
13635
|
+
/**
|
|
13636
|
+
* The uri represented by the tab.
|
|
13637
|
+
*/
|
|
13638
|
+
readonly uri: Uri;
|
|
13639
|
+
/**
|
|
13640
|
+
* Constructs a text tab input with the given URI.
|
|
13641
|
+
* @param uri The URI of the tab.
|
|
13642
|
+
*/
|
|
13643
|
+
constructor(uri: Uri);
|
|
13644
|
+
}
|
|
13645
|
+
|
|
13646
|
+
/**
|
|
13647
|
+
* The tab represents two text based resources
|
|
13648
|
+
* being rendered as a diff.
|
|
13649
|
+
*/
|
|
13650
|
+
export class TabInputTextDiff {
|
|
13651
|
+
/**
|
|
13652
|
+
* The uri of the original text resource.
|
|
13653
|
+
*/
|
|
13654
|
+
readonly original: Uri;
|
|
13655
|
+
/**
|
|
13656
|
+
* The uri of the modified text resource.
|
|
13657
|
+
*/
|
|
13658
|
+
readonly modified: Uri;
|
|
13659
|
+
/**
|
|
13660
|
+
* Constructs a new text diff tab input with the given URIs.
|
|
13661
|
+
* @param original The uri of the original text resource.
|
|
13662
|
+
* @param modified The uri of the modified text resource.
|
|
13663
|
+
*/
|
|
13664
|
+
constructor(original: Uri, modified: Uri);
|
|
13665
|
+
}
|
|
13666
|
+
|
|
13667
|
+
/**
|
|
13668
|
+
* The tab represents a custom editor.
|
|
13669
|
+
*/
|
|
13670
|
+
export class TabInputCustom {
|
|
13671
|
+
/**
|
|
13672
|
+
* The uri that the tab is representing.
|
|
13673
|
+
*/
|
|
13674
|
+
readonly uri: Uri;
|
|
13675
|
+
/**
|
|
13676
|
+
* The type of custom editor.
|
|
13677
|
+
*/
|
|
13678
|
+
readonly viewType: string;
|
|
13679
|
+
/**
|
|
13680
|
+
* Constructs a custom editor tab input.
|
|
13681
|
+
* @param uri The uri of the tab.
|
|
13682
|
+
* @param viewType The viewtype of the custom editor.
|
|
13683
|
+
*/
|
|
13684
|
+
constructor(uri: Uri, viewType: string);
|
|
13685
|
+
}
|
|
13686
|
+
|
|
13687
|
+
/**
|
|
13688
|
+
* The tab represents a webview.
|
|
13689
|
+
*/
|
|
13690
|
+
export class TabInputWebview {
|
|
13691
|
+
/**
|
|
13692
|
+
* The type of webview. Maps to WebviewPanel's viewType
|
|
13693
|
+
*/
|
|
13694
|
+
readonly viewType: string;
|
|
13695
|
+
/**
|
|
13696
|
+
* Constructs a webview tab input with the given view type.
|
|
13697
|
+
* @param viewType The type of webview. Maps to WebviewPanel's viewType
|
|
13698
|
+
*/
|
|
13699
|
+
constructor(viewType: string);
|
|
13700
|
+
}
|
|
13701
|
+
|
|
13702
|
+
/**
|
|
13703
|
+
* The tab represents a notebook.
|
|
13704
|
+
*/
|
|
13705
|
+
export class TabInputNotebook {
|
|
13706
|
+
/**
|
|
13707
|
+
* The uri that the tab is representing.
|
|
13708
|
+
*/
|
|
13709
|
+
readonly uri: Uri;
|
|
13710
|
+
/**
|
|
13711
|
+
* The type of notebook. Maps to NotebookDocuments's notebookType
|
|
13712
|
+
*/
|
|
13713
|
+
readonly notebookType: string;
|
|
13714
|
+
/**
|
|
13715
|
+
* Constructs a new tab input for a notebook.
|
|
13716
|
+
* @param uri The uri of the notebook.
|
|
13717
|
+
* @param notebookType The type of notebook. Maps to NotebookDocuments's notebookType
|
|
13718
|
+
*/
|
|
13719
|
+
constructor(uri: Uri, notebookType: string);
|
|
13720
|
+
}
|
|
13721
|
+
|
|
13722
|
+
/**
|
|
13723
|
+
* The tabs represents two notebooks in a diff configuration.
|
|
13724
|
+
*/
|
|
13725
|
+
export class TabInputNotebookDiff {
|
|
13726
|
+
/**
|
|
13727
|
+
* The uri of the original notebook.
|
|
13728
|
+
*/
|
|
13729
|
+
readonly original: Uri;
|
|
13730
|
+
/**
|
|
13731
|
+
* The uri of the modified notebook.
|
|
13732
|
+
*/
|
|
13733
|
+
readonly modified: Uri;
|
|
13734
|
+
/**
|
|
13735
|
+
* The type of notebook. Maps to NotebookDocuments's notebookType
|
|
13736
|
+
*/
|
|
13737
|
+
readonly notebookType: string;
|
|
13738
|
+
/**
|
|
13739
|
+
* Constructs a notebook diff tab input.
|
|
13740
|
+
* @param original The uri of the original unmodified notebook.
|
|
13741
|
+
* @param modified The uri of the modified notebook.
|
|
13742
|
+
* @param notebookType The type of notebook. Maps to NotebookDocuments's notebookType
|
|
13743
|
+
*/
|
|
13744
|
+
constructor(original: Uri, modified: Uri, notebookType: string);
|
|
13745
|
+
}
|
|
13746
|
+
|
|
13747
|
+
/**
|
|
13748
|
+
* The tab represents a terminal in the editor area.
|
|
13749
|
+
*/
|
|
13750
|
+
export class TabInputTerminal {
|
|
13751
|
+
/**
|
|
13752
|
+
* Constructs a terminal tab input.
|
|
13753
|
+
*/
|
|
13754
|
+
constructor();
|
|
13755
|
+
}
|
|
13756
|
+
|
|
13757
|
+
/**
|
|
13758
|
+
* Represents a tab within a {@link TabGroup group of tabs}.
|
|
13759
|
+
* Tabs are merely the graphical representation within the editor area.
|
|
13760
|
+
* A backing editor is not a guarantee.
|
|
13761
|
+
*/
|
|
13762
|
+
export interface Tab {
|
|
13763
|
+
|
|
13764
|
+
/**
|
|
13765
|
+
* The text displayed on the tab.
|
|
13766
|
+
*/
|
|
13767
|
+
readonly label: string;
|
|
13768
|
+
|
|
13769
|
+
/**
|
|
13770
|
+
* The group which the tab belongs to.
|
|
13771
|
+
*/
|
|
13772
|
+
readonly group: TabGroup;
|
|
13773
|
+
|
|
13774
|
+
/**
|
|
13775
|
+
* Defines the structure of the tab i.e. text, notebook, custom, etc.
|
|
13776
|
+
* Resource and other useful properties are defined on the tab kind.
|
|
13777
|
+
*/
|
|
13778
|
+
readonly input: TabInputText | TabInputTextDiff | TabInputCustom | TabInputWebview | TabInputNotebook | TabInputNotebookDiff | TabInputTerminal | unknown;
|
|
13779
|
+
|
|
13780
|
+
/**
|
|
13781
|
+
* Whether or not the tab is currently active.
|
|
13782
|
+
* This is dictated by being the selected tab in the group.
|
|
13783
|
+
*/
|
|
13784
|
+
readonly isActive: boolean;
|
|
13785
|
+
|
|
13786
|
+
/**
|
|
13787
|
+
* Whether or not the dirty indicator is present on the tab.
|
|
13788
|
+
*/
|
|
13789
|
+
readonly isDirty: boolean;
|
|
13790
|
+
|
|
13791
|
+
/**
|
|
13792
|
+
* Whether or not the tab is pinned (pin icon is present).
|
|
13793
|
+
*/
|
|
13794
|
+
readonly isPinned: boolean;
|
|
13795
|
+
|
|
13796
|
+
/**
|
|
13797
|
+
* Whether or not the tab is in preview mode.
|
|
13798
|
+
*/
|
|
13799
|
+
readonly isPreview: boolean;
|
|
13800
|
+
}
|
|
13801
|
+
|
|
13802
|
+
/**
|
|
13803
|
+
* An event describing change to tabs.
|
|
13804
|
+
*/
|
|
13805
|
+
export interface TabChangeEvent {
|
|
13806
|
+
/**
|
|
13807
|
+
* The tabs that have been opened.
|
|
13808
|
+
*/
|
|
13809
|
+
readonly opened: readonly Tab[];
|
|
13810
|
+
/**
|
|
13811
|
+
* The tabs that have been closed.
|
|
13812
|
+
*/
|
|
13813
|
+
readonly closed: readonly Tab[];
|
|
13814
|
+
/**
|
|
13815
|
+
* Tabs that have changed, e.g have changed
|
|
13816
|
+
* their {@link Tab.isActive active} state.
|
|
13817
|
+
*/
|
|
13818
|
+
readonly changed: readonly Tab[];
|
|
13819
|
+
}
|
|
13820
|
+
|
|
13821
|
+
/**
|
|
13822
|
+
* An event describing changes to tab groups.
|
|
13823
|
+
*/
|
|
13824
|
+
export interface TabGroupChangeEvent {
|
|
13825
|
+
/**
|
|
13826
|
+
* Tab groups that have been opened.
|
|
13827
|
+
*/
|
|
13828
|
+
readonly opened: readonly TabGroup[];
|
|
13829
|
+
/**
|
|
13830
|
+
* Tab groups that have been closed.
|
|
13831
|
+
*/
|
|
13832
|
+
readonly closed: readonly TabGroup[];
|
|
13833
|
+
/**
|
|
13834
|
+
* Tab groups that have changed, e.g have changed
|
|
13835
|
+
* their {@link TabGroup.isActive active} state.
|
|
13836
|
+
*/
|
|
13837
|
+
readonly changed: readonly TabGroup[];
|
|
13838
|
+
}
|
|
13839
|
+
|
|
13840
|
+
/**
|
|
13841
|
+
* Represents a group of tabs. A tab group itself consists of multiple tabs.
|
|
13842
|
+
*/
|
|
13843
|
+
export interface TabGroup {
|
|
13844
|
+
/**
|
|
13845
|
+
* Whether or not the group is currently active.
|
|
13846
|
+
*
|
|
13847
|
+
* *Note* that only one tab group is active at a time, but that multiple tab
|
|
13848
|
+
* groups can have an {@link TabGroup.aciveTab active tab}.
|
|
13849
|
+
*
|
|
13850
|
+
* @see {@link Tab.isActive}
|
|
13851
|
+
*/
|
|
13852
|
+
readonly isActive: boolean;
|
|
13853
|
+
|
|
13854
|
+
/**
|
|
13855
|
+
* The view column of the group.
|
|
13856
|
+
*/
|
|
13857
|
+
readonly viewColumn: ViewColumn;
|
|
13858
|
+
|
|
13859
|
+
/**
|
|
13860
|
+
* The active {@link Tab tab} in the group. This is the tab whose contents are currently
|
|
13861
|
+
* being rendered.
|
|
13862
|
+
*
|
|
13863
|
+
* *Note* that there can be one active tab per group but there can only be one {@link TabGroups.activeTabGroup active group}.
|
|
13864
|
+
*/
|
|
13865
|
+
readonly activeTab: Tab | undefined;
|
|
13866
|
+
|
|
13867
|
+
/**
|
|
13868
|
+
* The list of tabs contained within the group.
|
|
13869
|
+
* This can be empty if the group has no tabs open.
|
|
13870
|
+
*/
|
|
13871
|
+
readonly tabs: readonly Tab[];
|
|
13872
|
+
}
|
|
13873
|
+
|
|
13874
|
+
/**
|
|
13875
|
+
* Represents the main editor area which consists of multple groups which contain tabs.
|
|
13876
|
+
*/
|
|
13877
|
+
export interface TabGroups {
|
|
13878
|
+
/**
|
|
13879
|
+
* All the groups within the group container.
|
|
13880
|
+
*/
|
|
13881
|
+
readonly all: readonly TabGroup[];
|
|
13882
|
+
|
|
13883
|
+
/**
|
|
13884
|
+
* The currently active group.
|
|
13885
|
+
*/
|
|
13886
|
+
readonly activeTabGroup: TabGroup;
|
|
13887
|
+
|
|
13888
|
+
/**
|
|
13889
|
+
* An {@link Event event} which fires when {@link TabGroup tab groups} have changed.
|
|
13890
|
+
*/
|
|
13891
|
+
readonly onDidChangeTabGroups: Event<TabGroupChangeEvent>;
|
|
13892
|
+
|
|
13893
|
+
/**
|
|
13894
|
+
* An {@link Event event} which fires when {@link Tab tabs} have changed.
|
|
13895
|
+
*/
|
|
13896
|
+
readonly onDidChangeTabs: Event<TabChangeEvent>;
|
|
13897
|
+
|
|
13898
|
+
/**
|
|
13899
|
+
* Closes the tab. This makes the tab object invalid and the tab
|
|
13900
|
+
* should no longer be used for further actions.
|
|
13901
|
+
* Note: In the case of a dirty tab, a confirmation dialog will be shown which may be cancelled. If cancelled the tab is still valid
|
|
13902
|
+
*
|
|
13903
|
+
* @param tab The tab to close.
|
|
13904
|
+
* @param preserveFocus When `true` focus will remain in its current position. If `false` it will jump to the next tab.
|
|
13905
|
+
* @returns A promise that resolves to `true` when all tabs have been closed.
|
|
13906
|
+
*/
|
|
13907
|
+
close(tab: Tab | readonly Tab[], preserveFocus?: boolean): Thenable<boolean>;
|
|
13908
|
+
|
|
13909
|
+
/**
|
|
13910
|
+
* Closes the tab group. This makes the tab group object invalid and the tab group
|
|
13911
|
+
* should no longer be used for further actions.
|
|
13912
|
+
* @param tabGroup The tab group to close.
|
|
13913
|
+
* @param preserveFocus When `true` focus will remain in its current position.
|
|
13914
|
+
* @returns A promise that resolves to `true` when all tab groups have been closed.
|
|
13915
|
+
*/
|
|
13916
|
+
close(tabGroup: TabGroup | readonly TabGroup[], preserveFocus?: boolean): Thenable<boolean>;
|
|
13917
|
+
}
|
|
13759
13918
|
|
|
13760
13919
|
/**
|
|
13761
13920
|
* Represents a notebook editor that is attached to a {@link NotebookDocument notebook}.
|