@theia/plugin 1.34.0-next.7 → 1.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/theia.d.ts +390 -54
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.34.0-next.7+a73305748",
3
+ "version": "1.34.1",
4
4
  "description": "Theia - Plugin API",
5
5
  "types": "./src/theia.d.ts",
6
6
  "publishConfig": {
@@ -27,10 +27,10 @@
27
27
  "watch": "theiaext watch"
28
28
  },
29
29
  "devDependencies": {
30
- "@theia/ext-scripts": "1.33.0"
30
+ "@theia/ext-scripts": "1.34.1"
31
31
  },
32
32
  "nyc": {
33
33
  "extends": "../../configs/nyc.json"
34
34
  },
35
- "gitHead": "a73305748c89f9608c5f94ecc6d15924b49aaa0c"
35
+ "gitHead": "474bdc10b58be92953496b8bcac2af25ee2b48a3"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -3001,10 +3001,34 @@ export module '@theia/plugin' {
3001
3001
  */
3002
3002
  message?: string;
3003
3003
 
3004
+ /**
3005
+ * The {@link TerminalLocation} or {@link TerminalEditorLocationOptions} or {@link TerminalSplitLocationOptions} for the terminal.
3006
+ */
3007
+ location?: TerminalLocation | TerminalEditorLocationOptions | TerminalSplitLocationOptions;
3008
+
3009
+ /**
3010
+ * Opt-out of the default terminal persistence on restart and reload.
3011
+ * This will only take effect when `terminal.integrated.enablePersistentSessions` is enabled.
3012
+ */
3013
+ isTransient?: boolean;
3014
+
3004
3015
  /**
3005
3016
  * Terminal attributes. Can be useful to apply some implementation specific information.
3006
3017
  */
3007
3018
  attributes?: { [key: string]: string | null };
3019
+
3020
+ /**
3021
+ * The icon path or {@link ThemeIcon} for the terminal.
3022
+ */
3023
+ iconPath?: ThemeIcon;
3024
+
3025
+ /**
3026
+ * The icon {@link ThemeColor} for the terminal.
3027
+ * The `terminal.ansi*` theme keys are
3028
+ * recommended for the best contrast and consistency across themes.
3029
+ * @stubbed
3030
+ */
3031
+ color?: ThemeColor;
3008
3032
  }
3009
3033
 
3010
3034
  /**
@@ -3067,6 +3091,30 @@ export module '@theia/plugin' {
3067
3091
  * control it.
3068
3092
  */
3069
3093
  pty: Pseudoterminal;
3094
+
3095
+ /**
3096
+ * The {@link TerminalLocation} or {@link TerminalEditorLocationOptions} or {@link TerminalSplitLocationOptions} for the terminal.
3097
+ */
3098
+ location?: TerminalLocation | TerminalEditorLocationOptions | TerminalSplitLocationOptions;
3099
+
3100
+ /**
3101
+ * Opt-out of the default terminal persistence on restart and reload.
3102
+ * This will only take effect when `terminal.integrated.enablePersistentSessions` is enabled.
3103
+ */
3104
+ isTransient?: boolean;
3105
+
3106
+ /**
3107
+ * The icon path or {@link ThemeIcon} for the terminal.
3108
+ */
3109
+ iconPath?: ThemeIcon;
3110
+
3111
+ /**
3112
+ * The icon {@link ThemeColor} for the terminal.
3113
+ * The standard `terminal.ansi*` theme keys are
3114
+ * recommended for the best contrast and consistency across themes.
3115
+ * @stubbed
3116
+ */
3117
+ color?: ThemeColor;
3070
3118
  }
3071
3119
 
3072
3120
  /**
@@ -3207,6 +3255,79 @@ export module '@theia/plugin' {
3207
3255
  constructor(startIndex: number, length: number, tooltip?: string);
3208
3256
  }
3209
3257
 
3258
+ /**
3259
+ * The location of the {@link Terminal}.
3260
+ */
3261
+ export enum TerminalLocation {
3262
+ /**
3263
+ * In the terminal view
3264
+ */
3265
+ Panel = 1,
3266
+ /**
3267
+ * In the editor area
3268
+ */
3269
+ Editor = 2,
3270
+ }
3271
+
3272
+ /**
3273
+ * Assumes a {@link TerminalLocation} of editor and allows specifying a {@link ViewColumn} and
3274
+ * {@link TerminalEditorLocationOptions.preserveFocus preserveFocus } property
3275
+ */
3276
+ export interface TerminalEditorLocationOptions {
3277
+ /**
3278
+ * A view column in which the {@link Terminal terminal} should be shown in the editor area.
3279
+ * Use {@link ViewColumn.Active active} to open in the active editor group, other values are
3280
+ * adjusted to be `Min(column, columnCount + 1)`, the
3281
+ * {@link ViewColumn.Active active}-column is not adjusted. Use
3282
+ * {@linkcode ViewColumn.Beside} to open the editor to the side of the currently active one.
3283
+ */
3284
+ viewColumn: ViewColumn;
3285
+ /**
3286
+ * An optional flag that when `true` will stop the {@link Terminal} from taking focus.
3287
+ */
3288
+ preserveFocus?: boolean;
3289
+ }
3290
+
3291
+ /**
3292
+ * Uses the parent {@link Terminal}'s location for the terminal
3293
+ */
3294
+ export interface TerminalSplitLocationOptions {
3295
+ /**
3296
+ * The parent terminal to split this terminal beside. This works whether the parent terminal
3297
+ * is in the panel or the editor area.
3298
+ */
3299
+ parentTerminal: Terminal;
3300
+ }
3301
+
3302
+ /*
3303
+ * Provides a terminal profile for the contributed terminal profile when launched via the UI or
3304
+ * command.
3305
+ */
3306
+ export interface TerminalProfileProvider {
3307
+ /**
3308
+ * Provide the terminal profile.
3309
+ * @param token A cancellation token that indicates the result is no longer needed.
3310
+ * @returns The terminal profile.
3311
+ */
3312
+ provideTerminalProfile(token: CancellationToken): ProviderResult<TerminalProfile>;
3313
+ }
3314
+
3315
+ /**
3316
+ * A terminal profile defines how a terminal will be launched.
3317
+ */
3318
+ export class TerminalProfile {
3319
+ /**
3320
+ * The options that the terminal will launch with.
3321
+ */
3322
+ options: TerminalOptions | ExtensionTerminalOptions;
3323
+
3324
+ /**
3325
+ * Creates a new terminal profile.
3326
+ * @param options The options that the terminal will launch with.
3327
+ */
3328
+ constructor(options: TerminalOptions | ExtensionTerminalOptions);
3329
+ }
3330
+
3210
3331
  /**
3211
3332
  * A file decoration represents metadata that can be rendered with a file.
3212
3333
  */
@@ -3779,9 +3900,11 @@ export module '@theia/plugin' {
3779
3900
  /**
3780
3901
  * Controls whether command uris are enabled in webview content or not.
3781
3902
  *
3782
- * Defaults to false.
3903
+ * Defaults to `false` (command uris are disabled).
3904
+ *
3905
+ * If you pass in an array, only the commands in the array are allowed.
3783
3906
  */
3784
- readonly enableCommandUris?: boolean;
3907
+ readonly enableCommandUris?: boolean | readonly string[];
3785
3908
 
3786
3909
  /**
3787
3910
  * Root paths from which the webview can load local (filesystem) resources using the `theia-resource:` scheme.
@@ -4934,7 +5057,7 @@ export module '@theia/plugin' {
4934
5057
  *
4935
5058
  * @return New webview panel.
4936
5059
  */
4937
- export function createWebviewPanel(viewType: string, title: string, showOptions: ViewColumn | WebviewPanelShowOptions,
5060
+ export function createWebviewPanel(viewType: string, title: string, showOptions: ViewColumn | { readonly viewColumn: ViewColumn; readonly preserveFocus?: boolean },
4938
5061
  options?: WebviewPanelOptions & WebviewOptions): WebviewPanel;
4939
5062
 
4940
5063
  /**
@@ -5224,6 +5347,12 @@ export module '@theia/plugin' {
5224
5347
  * @return Disposable that unregisters the provider.
5225
5348
  */
5226
5349
  export function registerTerminalLinkProvider(provider: TerminalLinkProvider): Disposable;
5350
+ /**
5351
+ * Registers a provider for a contributed terminal profile.
5352
+ * @param id The ID of the contributed terminal profile.
5353
+ * @param provider The terminal profile provider.
5354
+ */
5355
+ export function registerTerminalProfileProvider(id: string, provider: TerminalProfileProvider): Disposable;
5227
5356
 
5228
5357
  /**
5229
5358
  * Register a file decoration provider.
@@ -5323,6 +5452,17 @@ export module '@theia/plugin' {
5323
5452
  */
5324
5453
  password: boolean;
5325
5454
 
5455
+ /**
5456
+ * Selection range in the input value. Defined as tuple of two number where the
5457
+ * first is the inclusive start index and the second the exclusive end index. When `undefined` the whole
5458
+ * pre-filled value will be selected, when empty (start equals end) only the cursor will be set,
5459
+ * otherwise the defined range will be selected.
5460
+ *
5461
+ * This property does not get updated when the user types or makes a selection,
5462
+ * but it can be updated by the extension.
5463
+ */
5464
+ valueSelection: readonly [number, number] | undefined;
5465
+
5326
5466
  /**
5327
5467
  * An event signaling when the value has changed.
5328
5468
  */
@@ -5527,6 +5667,17 @@ export module '@theia/plugin' {
5527
5667
  * Whether to show collapse all action or not.
5528
5668
  */
5529
5669
  showCollapseAll?: boolean;
5670
+
5671
+ /**
5672
+ * An optional interface to implement drag and drop in the tree view.
5673
+ */
5674
+ dragAndDropController?: TreeDragAndDropController<T>;
5675
+ /**
5676
+ * Whether the tree supports multi-select. When the tree supports multi-select and a command is executed from the tree,
5677
+ * the first argument to the command is the tree item that the command was executed on and the second argument is an
5678
+ * array containing all selected tree items.
5679
+ */
5680
+ canSelectMany?: boolean;
5530
5681
  }
5531
5682
 
5532
5683
  /**
@@ -5565,6 +5716,165 @@ export module '@theia/plugin' {
5565
5716
 
5566
5717
  }
5567
5718
 
5719
+ /**
5720
+ * A file associated with a {@linkcode DataTransferItem}.
5721
+ */
5722
+ export interface DataTransferFile {
5723
+ /**
5724
+ * The name of the file.
5725
+ */
5726
+ readonly name: string;
5727
+
5728
+ /**
5729
+ * The full file path of the file.
5730
+ *
5731
+ * May be `undefined` on web.
5732
+ */
5733
+ readonly uri?: Uri;
5734
+
5735
+ /**
5736
+ * The full file contents of the file.
5737
+ */
5738
+ data(): Thenable<Uint8Array>;
5739
+ }
5740
+
5741
+ /**
5742
+ * Encapsulates data transferred during drag and drop operations.
5743
+ */
5744
+ export class DataTransferItem {
5745
+ /**
5746
+ * Get a string representation of this item.
5747
+ *
5748
+ * If {@linkcode DataTransferItem.value} is an object, this returns the result of json stringifying {@linkcode DataTransferItem.value} value.
5749
+ */
5750
+ asString(): Thenable<string>;
5751
+
5752
+ /**
5753
+ * Try getting the {@link DataTransferFile file} associated with this data transfer item.
5754
+ *
5755
+ * Note that the file object is only valid for the scope of the drag and drop operation.
5756
+ *
5757
+ * @returns The file for the data transfer or `undefined` if the item is either not a file or the
5758
+ * file data cannot be accessed.
5759
+ */
5760
+ asFile(): DataTransferFile | undefined;
5761
+
5762
+ /**
5763
+ * Custom data stored on this item.
5764
+ *
5765
+ * You can use `value` to share data across operations. The original object can be retrieved so long as the extension that
5766
+ * created the `DataTransferItem` runs in the same extension host.
5767
+ */
5768
+ readonly value: any;
5769
+
5770
+ /**
5771
+ * @param value Custom data stored on this item. Can be retrieved using {@linkcode DataTransferItem.value}.
5772
+ */
5773
+ constructor(value: any);
5774
+ }
5775
+
5776
+ /**
5777
+ * A map containing a mapping of the mime type of the corresponding transferred data.
5778
+ *
5779
+ * Drag and drop controllers that implement {@link TreeDragAndDropController.handleDrag `handleDrag`} can add additional mime types to the
5780
+ * data transfer. These additional mime types will only be included in the `handleDrop` when the the drag was initiated from
5781
+ * an element in the same drag and drop controller.
5782
+ */
5783
+ export class DataTransfer implements Iterable<[mimeType: string, item: DataTransferItem]> {
5784
+ /**
5785
+ * Retrieves the data transfer item for a given mime type.
5786
+ *
5787
+ * @param mimeType The mime type to get the data transfer item for, such as `text/plain` or `image/png`.
5788
+ *
5789
+ * Special mime types:
5790
+ * - `text/uri-list` — A string with `toString()`ed Uris separated by `\r\n`. To specify a cursor position in the file,
5791
+ * set the Uri's fragment to `L3,5`, where 3 is the line number and 5 is the column number.
5792
+ */
5793
+ get(mimeType: string): DataTransferItem | undefined;
5794
+
5795
+ /**
5796
+ * Sets a mime type to data transfer item mapping.
5797
+ * @param mimeType The mime type to set the data for.
5798
+ * @param value The data transfer item for the given mime type.
5799
+ */
5800
+ set(mimeType: string, value: DataTransferItem): void;
5801
+
5802
+ /**
5803
+ * Allows iteration through the data transfer items.
5804
+ *
5805
+ * @param callbackfn Callback for iteration through the data transfer items.
5806
+ * @param thisArg The `this` context used when invoking the handler function.
5807
+ */
5808
+ forEach(callbackfn: (item: DataTransferItem, mimeType: string, dataTransfer: DataTransfer) => void, thisArg?: any): void;
5809
+
5810
+ /**
5811
+ * Get a new iterator with the `[mime, item]` pairs for each element in this data transfer.
5812
+ */
5813
+ [Symbol.iterator](): IterableIterator<[mimeType: string, item: DataTransferItem]>;
5814
+ }
5815
+
5816
+ /**
5817
+ * Provides support for drag and drop in `TreeView`.
5818
+ */
5819
+ export interface TreeDragAndDropController<T> {
5820
+
5821
+ /**
5822
+ * The mime types that the {@link TreeDragAndDropController.handleDrop `handleDrop`} method of this `DragAndDropController` supports.
5823
+ * This could be well-defined, existing, mime types, and also mime types defined by the extension.
5824
+ *
5825
+ * To support drops from trees, you will need to add the mime type of that tree.
5826
+ * This includes drops from within the same tree.
5827
+ * The mime type of a tree is recommended to be of the format `application/vnd.code.tree.<treeidlowercase>`.
5828
+ *
5829
+ * Use the special `files` mime type to support all types of dropped files {@link DataTransferFile files}, regardless of the file's actual mime type.
5830
+ *
5831
+ * To learn the mime type of a dragged item:
5832
+ * 1. Set up your `DragAndDropController`
5833
+ * 2. Use the Developer: Set Log Level... command to set the level to "Debug"
5834
+ * 3. Open the developer tools and drag the item with unknown mime type over your tree. The mime types will be logged to the developer console
5835
+ *
5836
+ * Note that mime types that cannot be sent to the extension will be omitted.
5837
+ */
5838
+ readonly dropMimeTypes: readonly string[];
5839
+
5840
+ /**
5841
+ * The mime types that the {@link TreeDragAndDropController.handleDrag `handleDrag`} method of this `TreeDragAndDropController` may add to the tree data transfer.
5842
+ * This could be well-defined, existing, mime types, and also mime types defined by the extension.
5843
+ *
5844
+ * The recommended mime type of the tree (`application/vnd.code.tree.<treeidlowercase>`) will be automatically added.
5845
+ */
5846
+ readonly dragMimeTypes: readonly string[];
5847
+
5848
+ /**
5849
+ * When the user starts dragging items from this `DragAndDropController`, `handleDrag` will be called.
5850
+ * Extensions can use `handleDrag` to add their {@link DataTransferItem `DataTransferItem`} items to the drag and drop.
5851
+ *
5852
+ * When the items are dropped on **another tree item** in **the same tree**, your `DataTransferItem` objects
5853
+ * will be preserved. Use the recommended mime type for the tree (`application/vnd.code.tree.<treeidlowercase>`) to add
5854
+ * tree objects in a data transfer. See the documentation for `DataTransferItem` for how best to take advantage of this.
5855
+ *
5856
+ * To add a data transfer item that can be dragged into the editor, use the application specific mime type "text/uri-list".
5857
+ * The data for "text/uri-list" should be a string with `toString()`ed Uris separated by newlines. To specify a cursor position in the file,
5858
+ * set the Uri's fragment to `L3,5`, where 3 is the line number and 5 is the column number.
5859
+ *
5860
+ * @param source The source items for the drag and drop operation.
5861
+ * @param dataTransfer The data transfer associated with this drag.
5862
+ * @param token A cancellation token indicating that drag has been cancelled.
5863
+ */
5864
+ handleDrag?(source: readonly T[], dataTransfer: DataTransfer, token: CancellationToken): Thenable<void> | void;
5865
+
5866
+ /**
5867
+ * Called when a drag and drop action results in a drop on the tree that this `DragAndDropController` belongs to.
5868
+ *
5869
+ * Extensions should fire {@link TreeDataProvider.onDidChangeTreeData onDidChangeTreeData} for any elements that need to be refreshed.
5870
+ *
5871
+ * @param dataTransfer The data transfer items of the source of the drag.
5872
+ * @param target The target tree element that the drop is occurring on. When undefined, the target is the root.
5873
+ * @param token A cancellation token indicating that the drop has been cancelled.
5874
+ */
5875
+ handleDrop?(target: T | undefined, dataTransfer: DataTransfer, token: CancellationToken): Thenable<void> | void;
5876
+ }
5877
+
5568
5878
  /**
5569
5879
  * Represents a Tree view
5570
5880
  */
@@ -7461,7 +7771,7 @@ export module '@theia/plugin' {
7461
7771
  * The `activeSignatureHelp` has its [`SignatureHelp.activeSignature`] field updated based on
7462
7772
  * the user arrowing through available signatures.
7463
7773
  */
7464
- readonly activeSignatureHelp?: SignatureHelp;
7774
+ readonly activeSignatureHelp: SignatureHelp | undefined;
7465
7775
  }
7466
7776
 
7467
7777
  /**
@@ -8769,11 +9079,21 @@ export module '@theia/plugin' {
8769
9079
  source?: string;
8770
9080
 
8771
9081
  /**
8772
- * A code or identifier for this diagnostics. Will not be surfaced
8773
- * to the user, but should be used for later processing, e.g. when
8774
- * providing {@link CodeActionContext code actions}.
9082
+ * A code or identifier for this diagnostic.
9083
+ * Should be used for later processing, e.g. when providing {@link CodeActionContext code actions}.
8775
9084
  */
8776
- code?: string | number;
9085
+ code?: string | number | {
9086
+ /**
9087
+ * A code or identifier for this diagnostic.
9088
+ * Should be used for later processing, e.g. when providing {@link CodeActionContext code actions}.
9089
+ */
9090
+ value: string | number;
9091
+
9092
+ /**
9093
+ * A target URI to open with more information about the diagnostic error.
9094
+ */
9095
+ target: Uri;
9096
+ };
8777
9097
 
8778
9098
  /**
8779
9099
  * An array of related diagnostic information, e.g. when symbol-names within
@@ -9388,7 +9708,15 @@ export module '@theia/plugin' {
9388
9708
  * @param uri A resource identifier.
9389
9709
  * @param edits An array of text edits.
9390
9710
  */
9391
- set(uri: Uri, edits: TextEdit[]): void;
9711
+ set(uri: Uri, edits: ReadonlyArray<TextEdit | SnippetTextEdit>): void;
9712
+
9713
+ /**
9714
+ * Set (and replace) text edits or snippet edits with metadata for a resource.
9715
+ *
9716
+ * @param uri A resource identifier.
9717
+ * @param edits An array of edits.
9718
+ */
9719
+ set(uri: Uri, edits: ReadonlyArray<[TextEdit | SnippetTextEdit, WorkspaceEditEntryMetadata]>): void;
9392
9720
 
9393
9721
  /**
9394
9722
  * Get the text edits for a resource.
@@ -10710,6 +11038,11 @@ export module '@theia/plugin' {
10710
11038
  * Controls whether the input box is visible (default is true).
10711
11039
  */
10712
11040
  visible: boolean;
11041
+
11042
+ /**
11043
+ * Controls whether the input box is enabled (default is `true`).
11044
+ */
11045
+ enabled: boolean;
10713
11046
  }
10714
11047
 
10715
11048
  interface QuickDiffProvider {
@@ -13141,13 +13474,11 @@ export module '@theia/plugin' {
13141
13474
  export class TabInputText {
13142
13475
  /**
13143
13476
  * The uri represented by the tab.
13144
- * @stubbed
13145
13477
  */
13146
13478
  readonly uri: Uri;
13147
13479
  /**
13148
13480
  * Constructs a text tab input with the given URI.
13149
13481
  * @param uri The URI of the tab.
13150
- * @stubbed
13151
13482
  */
13152
13483
  constructor(uri: Uri);
13153
13484
  }
@@ -13159,19 +13490,16 @@ export module '@theia/plugin' {
13159
13490
  export class TabInputTextDiff {
13160
13491
  /**
13161
13492
  * The uri of the original text resource.
13162
- * @stubbed
13163
13493
  */
13164
13494
  readonly original: Uri;
13165
13495
  /**
13166
13496
  * The uri of the modified text resource.
13167
- * @stubbed
13168
13497
  */
13169
13498
  readonly modified: Uri;
13170
13499
  /**
13171
13500
  * Constructs a new text diff tab input with the given URIs.
13172
13501
  * @param original The uri of the original text resource.
13173
13502
  * @param modified The uri of the modified text resource.
13174
- * @stubbed
13175
13503
  */
13176
13504
  constructor(original: Uri, modified: Uri);
13177
13505
  }
@@ -13182,19 +13510,16 @@ export module '@theia/plugin' {
13182
13510
  export class TabInputCustom {
13183
13511
  /**
13184
13512
  * The uri that the tab is representing.
13185
- * @stubbed
13186
13513
  */
13187
13514
  readonly uri: Uri;
13188
13515
  /**
13189
13516
  * The type of custom editor.
13190
- * @stubbed
13191
13517
  */
13192
13518
  readonly viewType: string;
13193
13519
  /**
13194
13520
  * Constructs a custom editor tab input.
13195
13521
  * @param uri The uri of the tab.
13196
13522
  * @param viewType The viewtype of the custom editor.
13197
- * @stubbed
13198
13523
  */
13199
13524
  constructor(uri: Uri, viewType: string);
13200
13525
  }
@@ -13205,13 +13530,11 @@ export module '@theia/plugin' {
13205
13530
  export class TabInputWebview {
13206
13531
  /**
13207
13532
  * The type of webview. Maps to WebviewPanel's viewType
13208
- * @stubbed
13209
13533
  */
13210
13534
  readonly viewType: string;
13211
13535
  /**
13212
13536
  * Constructs a webview tab input with the given view type.
13213
13537
  * @param viewType The type of webview. Maps to WebviewPanel's viewType
13214
- * @stubbed
13215
13538
  */
13216
13539
  constructor(viewType: string);
13217
13540
  }
@@ -13222,19 +13545,16 @@ export module '@theia/plugin' {
13222
13545
  export class TabInputNotebook {
13223
13546
  /**
13224
13547
  * The uri that the tab is representing.
13225
- * @stubbed
13226
13548
  */
13227
13549
  readonly uri: Uri;
13228
13550
  /**
13229
13551
  * The type of notebook. Maps to NotebookDocuments's notebookType
13230
- * @stubbed
13231
13552
  */
13232
13553
  readonly notebookType: string;
13233
13554
  /**
13234
13555
  * Constructs a new tab input for a notebook.
13235
13556
  * @param uri The uri of the notebook.
13236
13557
  * @param notebookType The type of notebook. Maps to NotebookDocuments's notebookType
13237
- * @stubbed
13238
13558
  */
13239
13559
  constructor(uri: Uri, notebookType: string);
13240
13560
  }
@@ -13245,17 +13565,14 @@ export module '@theia/plugin' {
13245
13565
  export class TabInputNotebookDiff {
13246
13566
  /**
13247
13567
  * The uri of the original notebook.
13248
- * @stubbed
13249
13568
  */
13250
13569
  readonly original: Uri;
13251
13570
  /**
13252
13571
  * The uri of the modified notebook.
13253
- * @stubbed
13254
13572
  */
13255
13573
  readonly modified: Uri;
13256
13574
  /**
13257
13575
  * The type of notebook. Maps to NotebookDocuments's notebookType
13258
- * @stubbed
13259
13576
  */
13260
13577
  readonly notebookType: string;
13261
13578
  /**
@@ -13263,7 +13580,6 @@ export module '@theia/plugin' {
13263
13580
  * @param original The uri of the original unmodified notebook.
13264
13581
  * @param modified The uri of the modified notebook.
13265
13582
  * @param notebookType The type of notebook. Maps to NotebookDocuments's notebookType
13266
- * @stubbed
13267
13583
  */
13268
13584
  constructor(original: Uri, modified: Uri, notebookType: string);
13269
13585
  }
@@ -13274,7 +13590,6 @@ export module '@theia/plugin' {
13274
13590
  export class TabInputTerminal {
13275
13591
  /**
13276
13592
  * Constructs a terminal tab input.
13277
- * @stubbed
13278
13593
  */
13279
13594
  constructor();
13280
13595
  }
@@ -13288,45 +13603,38 @@ export module '@theia/plugin' {
13288
13603
 
13289
13604
  /**
13290
13605
  * The text displayed on the tab.
13291
- * @stubbed
13292
13606
  */
13293
13607
  readonly label: string;
13294
13608
 
13295
13609
  /**
13296
13610
  * The group which the tab belongs to.
13297
- * @stubbed
13298
13611
  */
13299
13612
  readonly group: TabGroup;
13300
13613
 
13301
13614
  /**
13302
13615
  * Defines the structure of the tab i.e. text, notebook, custom, etc.
13303
13616
  * Resource and other useful properties are defined on the tab kind.
13304
- * @stubbed
13305
13617
  */
13306
13618
  readonly input: TabInputText | TabInputTextDiff | TabInputCustom | TabInputWebview | TabInputNotebook | TabInputNotebookDiff | TabInputTerminal | unknown;
13307
13619
 
13308
13620
  /**
13309
13621
  * Whether or not the tab is currently active.
13310
13622
  * This is dictated by being the selected tab in the group.
13311
- * @stubbed
13312
13623
  */
13313
13624
  readonly isActive: boolean;
13314
13625
 
13315
13626
  /**
13316
13627
  * Whether or not the dirty indicator is present on the tab.
13317
- * @stubbed
13318
13628
  */
13319
13629
  readonly isDirty: boolean;
13320
13630
 
13321
13631
  /**
13322
13632
  * Whether or not the tab is pinned (pin icon is present).
13323
- * @stubbed
13324
13633
  */
13325
13634
  readonly isPinned: boolean;
13326
13635
 
13327
13636
  /**
13328
13637
  * Whether or not the tab is in preview mode.
13329
- * @stubbed
13330
13638
  */
13331
13639
  readonly isPreview: boolean;
13332
13640
  }
@@ -13337,18 +13645,15 @@ export module '@theia/plugin' {
13337
13645
  export interface TabChangeEvent {
13338
13646
  /**
13339
13647
  * The tabs that have been opened.
13340
- * @stubbed
13341
13648
  */
13342
13649
  readonly opened: readonly Tab[];
13343
13650
  /**
13344
13651
  * The tabs that have been closed.
13345
- * @stubbed
13346
13652
  */
13347
13653
  readonly closed: readonly Tab[];
13348
13654
  /**
13349
13655
  * Tabs that have changed, e.g have changed
13350
13656
  * their {@link Tab.isActive active} state.
13351
- * @stubbed
13352
13657
  */
13353
13658
  readonly changed: readonly Tab[];
13354
13659
  }
@@ -13359,18 +13664,15 @@ export module '@theia/plugin' {
13359
13664
  export interface TabGroupChangeEvent {
13360
13665
  /**
13361
13666
  * Tab groups that have been opened.
13362
- * @stubbed
13363
13667
  */
13364
13668
  readonly opened: readonly TabGroup[];
13365
13669
  /**
13366
13670
  * Tab groups that have been closed.
13367
- * @stubbed
13368
13671
  */
13369
13672
  readonly closed: readonly TabGroup[];
13370
13673
  /**
13371
13674
  * Tab groups that have changed, e.g have changed
13372
13675
  * their {@link TabGroup.isActive active} state.
13373
- * @stubbed
13374
13676
  */
13375
13677
  readonly changed: readonly TabGroup[];
13376
13678
  }
@@ -13386,13 +13688,11 @@ export module '@theia/plugin' {
13386
13688
  * groups can have an {@link TabGroup.aciveTab active tab}.
13387
13689
  *
13388
13690
  * @see {@link Tab.isActive}
13389
- * @stubbed
13390
13691
  */
13391
13692
  readonly isActive: boolean;
13392
13693
 
13393
13694
  /**
13394
13695
  * The view column of the group.
13395
- * @stubbed
13396
13696
  */
13397
13697
  readonly viewColumn: ViewColumn;
13398
13698
 
@@ -13401,14 +13701,12 @@ export module '@theia/plugin' {
13401
13701
  * being rendered.
13402
13702
  *
13403
13703
  * *Note* that there can be one active tab per group but there can only be one {@link TabGroups.activeTabGroup active group}.
13404
- * @stubbed
13405
13704
  */
13406
13705
  readonly activeTab: Tab | undefined;
13407
13706
 
13408
13707
  /**
13409
13708
  * The list of tabs contained within the group.
13410
13709
  * This can be empty if the group has no tabs open.
13411
- * @stubbed
13412
13710
  */
13413
13711
  readonly tabs: readonly Tab[];
13414
13712
  }
@@ -13419,25 +13717,21 @@ export module '@theia/plugin' {
13419
13717
  export interface TabGroups {
13420
13718
  /**
13421
13719
  * All the groups within the group container.
13422
- * @stubbed
13423
13720
  */
13424
13721
  readonly all: readonly TabGroup[];
13425
13722
 
13426
13723
  /**
13427
13724
  * The currently active group.
13428
- * @stubbed
13429
13725
  */
13430
13726
  readonly activeTabGroup: TabGroup;
13431
13727
 
13432
13728
  /**
13433
13729
  * An {@link Event event} which fires when {@link TabGroup tab groups} have changed.
13434
- * @stubbed
13435
13730
  */
13436
13731
  readonly onDidChangeTabGroups: Event<TabGroupChangeEvent>;
13437
13732
 
13438
13733
  /**
13439
13734
  * An {@link Event event} which fires when {@link Tab tabs} have changed.
13440
- * @stubbed
13441
13735
  */
13442
13736
  readonly onDidChangeTabs: Event<TabChangeEvent>;
13443
13737
 
@@ -13449,7 +13743,6 @@ export module '@theia/plugin' {
13449
13743
  * @param tab The tab to close.
13450
13744
  * @param preserveFocus When `true` focus will remain in its current position. If `false` it will jump to the next tab.
13451
13745
  * @returns A promise that resolves to `true` when all tabs have been closed.
13452
- * @stubbed
13453
13746
  */
13454
13747
  close(tab: Tab | readonly Tab[], preserveFocus?: boolean): Thenable<boolean>;
13455
13748
 
@@ -13600,7 +13893,6 @@ export module '@theia/plugin' {
13600
13893
 
13601
13894
  /**
13602
13895
  * The {@link NotebookDocument notebook} that contains this cell.
13603
- * @stubbed
13604
13896
  */
13605
13897
  readonly notebook: NotebookDocument;
13606
13898
 
@@ -13661,26 +13953,22 @@ export module '@theia/plugin' {
13661
13953
  /**
13662
13954
  * The version number of this notebook (it will strictly increase after each
13663
13955
  * change, including undo/redo).
13664
- * @stubbed
13665
13956
  */
13666
13957
  readonly version: number;
13667
13958
 
13668
13959
  /**
13669
13960
  * `true` if there are unpersisted changes.
13670
- * @stubbed
13671
13961
  */
13672
13962
  readonly isDirty: boolean;
13673
13963
 
13674
13964
  /**
13675
13965
  * Is this notebook representing an untitled file which has not been saved yet.
13676
- * @stubbed
13677
13966
  */
13678
13967
  readonly isUntitled: boolean;
13679
13968
 
13680
13969
  /**
13681
13970
  * `true` if the notebook has been closed. A closed notebook isn't synchronized anymore
13682
13971
  * and won't be re-used when the same resource is opened again.
13683
- * @stubbed
13684
13972
  */
13685
13973
  readonly isClosed: boolean;
13686
13974
 
@@ -14196,6 +14484,54 @@ export module '@theia/plugin' {
14196
14484
  readonly selections?: readonly NotebookRange[];
14197
14485
  }
14198
14486
 
14487
+ /**
14488
+ * A snippet edit represents an interactive edit that is performed by
14489
+ * the editor.
14490
+ *
14491
+ * *Note* that a snippet edit can always be performed as a normal {@link TextEdit text edit}.
14492
+ * This will happen when no matching editor is open or when a {@link WorkspaceEdit workspace edit}
14493
+ * contains snippet edits for multiple files. In that case only those that match the active editor
14494
+ * will be performed as snippet edits and the others as normal text edits.
14495
+ */
14496
+ export class SnippetTextEdit {
14497
+
14498
+ /**
14499
+ * Utility to create a replace snippet edit.
14500
+ *
14501
+ * @param range A range.
14502
+ * @param snippet A snippet string.
14503
+ * @return A new snippet edit object.
14504
+ */
14505
+ static replace(range: Range, snippet: SnippetString): SnippetTextEdit;
14506
+
14507
+ /**
14508
+ * Utility to create an insert snippet edit.
14509
+ *
14510
+ * @param position A position, will become an empty range.
14511
+ * @param snippet A snippet string.
14512
+ * @return A new snippet edit object.
14513
+ */
14514
+ static insert(position: Position, snippet: SnippetString): SnippetTextEdit;
14515
+
14516
+ /**
14517
+ * The range this edit applies to.
14518
+ */
14519
+ range: Range;
14520
+
14521
+ /**
14522
+ * The {@link SnippetString snippet} this edit will perform.
14523
+ */
14524
+ snippet: SnippetString;
14525
+
14526
+ /**
14527
+ * Create a new snippet edit.
14528
+ *
14529
+ * @param range A range.
14530
+ * @param snippet A snippet string.
14531
+ */
14532
+ constructor(range: Range, snippet: SnippetString);
14533
+ }
14534
+
14199
14535
  /**
14200
14536
  * A notebook edit represents edits that should be applied to the contents of a notebook.
14201
14537
  */