@theia/plugin 1.68.0-next.9 → 1.68.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/package.json +3 -3
- package/src/theia.d.ts +262 -160
- package/src/theia.proposed.editorHoverVerbosityLevel.d.ts +94 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.68.0
|
|
3
|
+
"version": "1.68.0",
|
|
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.68.0"
|
|
31
31
|
},
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "d844a76de68367f16a726f1eae0c2032ecb85f63"
|
|
36
36
|
}
|
package/src/theia.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ import './theia.proposed.customEditorMove';
|
|
|
27
27
|
import './theia.proposed.debugVisualization';
|
|
28
28
|
import './theia.proposed.diffCommand';
|
|
29
29
|
import './theia.proposed.editSessionIdentityProvider';
|
|
30
|
+
import './theia.proposed.editorHoverVerbosityLevel';
|
|
30
31
|
import './theia.proposed.extensionsAny';
|
|
31
32
|
import './theia.proposed.externalUriOpener';
|
|
32
33
|
import './theia.proposed.findTextInFiles';
|
|
@@ -2185,98 +2186,144 @@ export module '@theia/plugin' {
|
|
|
2185
2186
|
export interface QuickPickItem {
|
|
2186
2187
|
|
|
2187
2188
|
/**
|
|
2188
|
-
* A human-readable string which is rendered
|
|
2189
|
-
*
|
|
2189
|
+
* A human-readable string which is rendered prominently.
|
|
2190
|
+
*
|
|
2191
|
+
* Supports rendering of {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
|
|
2192
|
+
*
|
|
2193
|
+
* **Note:** When {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Default} (so a regular
|
|
2194
|
+
* item instead of a separator), it supports rendering of {@link ThemeIcon theme icons} via the
|
|
2195
|
+
* `$(<name>)`-syntax.
|
|
2190
2196
|
*/
|
|
2191
2197
|
label: string;
|
|
2192
2198
|
|
|
2193
2199
|
/**
|
|
2194
|
-
*
|
|
2195
|
-
*
|
|
2200
|
+
* The kind of this item that determines how it is rendered in the quick pick.
|
|
2201
|
+
*
|
|
2202
|
+
* When not specified, the default is {@link QuickPickItemKind.Default}.
|
|
2196
2203
|
*/
|
|
2197
2204
|
kind?: QuickPickItemKind;
|
|
2198
2205
|
|
|
2199
2206
|
/**
|
|
2200
|
-
* The icon
|
|
2207
|
+
* The icon for the item.
|
|
2201
2208
|
*/
|
|
2202
2209
|
iconPath?: IconPath;
|
|
2203
2210
|
|
|
2204
2211
|
/**
|
|
2205
|
-
* A human-readable string which is rendered less
|
|
2206
|
-
* {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
|
|
2212
|
+
* A human-readable string which is rendered less prominently in the same line.
|
|
2207
2213
|
*
|
|
2208
|
-
*
|
|
2214
|
+
* Supports rendering of {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
|
|
2215
|
+
*
|
|
2216
|
+
* **Note:** This property is ignored when {@link QuickPickItem.kind kind} is set to
|
|
2217
|
+
* {@link QuickPickItemKind.Separator}.
|
|
2209
2218
|
*/
|
|
2210
2219
|
description?: string;
|
|
2211
2220
|
|
|
2212
2221
|
/**
|
|
2213
|
-
* A human-readable string which is rendered less
|
|
2214
|
-
*
|
|
2222
|
+
* A human-readable string which is rendered less prominently in a separate line.
|
|
2223
|
+
*
|
|
2224
|
+
* Supports rendering of {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
|
|
2215
2225
|
*
|
|
2216
|
-
* Note
|
|
2226
|
+
* **Note:** This property is ignored when {@link QuickPickItem.kind kind} is set to
|
|
2227
|
+
* {@link QuickPickItemKind.Separator}.
|
|
2217
2228
|
*/
|
|
2218
2229
|
detail?: string;
|
|
2219
2230
|
|
|
2220
2231
|
/**
|
|
2221
|
-
*
|
|
2222
|
-
*
|
|
2223
|
-
*
|
|
2224
|
-
*
|
|
2232
|
+
* A {@link Uri} representing the resource associated with this item.
|
|
2233
|
+
*
|
|
2234
|
+
* When set, this property is used to automatically derive several item properties if they are not explicitly provided:
|
|
2235
|
+
* - **Label**: Derived from the resource's file name when {@link QuickPickItem.label label} is not provided or is empty.
|
|
2236
|
+
* - **Description**: Derived from the resource's path when {@link QuickPickItem.description description} is not provided or is empty.
|
|
2237
|
+
* - **Icon**: Derived from the current file icon theme when {@link QuickPickItem.iconPath iconPath} is set to
|
|
2238
|
+
* {@link ThemeIcon.File} or {@link ThemeIcon.Folder}.
|
|
2239
|
+
*/
|
|
2240
|
+
resourceUri?: Uri;
|
|
2241
|
+
|
|
2242
|
+
/**
|
|
2243
|
+
* Optional flag indicating if this item is initially selected.
|
|
2244
|
+
*
|
|
2245
|
+
* This is only honored when using the {@link window.showQuickPick showQuickPick} API. To do the same
|
|
2246
|
+
* thing with the {@link window.createQuickPick createQuickPick} API, simply set the
|
|
2247
|
+
* {@link QuickPick.selectedItems selectedItems} to the items you want selected initially.
|
|
2248
|
+
*
|
|
2249
|
+
* **Note:** This is only honored when the picker allows multiple selections.
|
|
2225
2250
|
*
|
|
2226
2251
|
* @see {@link QuickPickOptions.canPickMany}
|
|
2227
2252
|
*
|
|
2228
|
-
* Note
|
|
2253
|
+
* **Note:** This property is ignored when {@link QuickPickItem.kind kind} is set to
|
|
2254
|
+
* {@link QuickPickItemKind.Separator}.
|
|
2229
2255
|
*/
|
|
2230
2256
|
picked?: boolean;
|
|
2231
2257
|
|
|
2232
2258
|
/**
|
|
2233
|
-
*
|
|
2259
|
+
* Determines if this item is always shown, even when filtered out by the user's input.
|
|
2234
2260
|
*
|
|
2235
|
-
* Note
|
|
2261
|
+
* **Note:** This property is ignored when {@link QuickPickItem.kind kind} is set to
|
|
2262
|
+
* {@link QuickPickItemKind.Separator}.
|
|
2236
2263
|
*/
|
|
2237
2264
|
alwaysShow?: boolean;
|
|
2238
2265
|
|
|
2239
2266
|
/**
|
|
2240
|
-
* Optional buttons that will be rendered on this particular item.
|
|
2241
|
-
*
|
|
2242
|
-
*
|
|
2243
|
-
* the {@link window.
|
|
2267
|
+
* Optional buttons that will be rendered on this particular item.
|
|
2268
|
+
*
|
|
2269
|
+
* These buttons will trigger an {@link QuickPickItemButtonEvent} when pressed. Buttons are only rendered
|
|
2270
|
+
* when using a quick pick created by the {@link window.createQuickPick createQuickPick} API. Buttons are
|
|
2271
|
+
* not rendered when using the {@link window.showQuickPick showQuickPick} API.
|
|
2244
2272
|
*
|
|
2245
|
-
* Note
|
|
2273
|
+
* **Note:** This property is ignored when {@link QuickPickItem.kind kind} is set to
|
|
2274
|
+
* {@link QuickPickItemKind.Separator}.
|
|
2246
2275
|
*/
|
|
2247
2276
|
buttons?: readonly QuickInputButton[];
|
|
2248
2277
|
}
|
|
2249
2278
|
|
|
2250
2279
|
/**
|
|
2251
|
-
*
|
|
2280
|
+
* Defines the kind of {@link QuickPickItem quick pick item}.
|
|
2252
2281
|
*/
|
|
2253
2282
|
export enum QuickPickItemKind {
|
|
2283
|
+
/**
|
|
2284
|
+
* A separator item that provides a visual grouping.
|
|
2285
|
+
*
|
|
2286
|
+
* When a {@link QuickPickItem} has a kind of {@link Separator}, the item is just a visual separator
|
|
2287
|
+
* and does not represent a selectable item. The only property that applies is
|
|
2288
|
+
* {@link QuickPickItem.label label}. All other properties on {@link QuickPickItem} will be ignored
|
|
2289
|
+
* and have no effect.
|
|
2290
|
+
*/
|
|
2254
2291
|
Separator = -1,
|
|
2292
|
+
/**
|
|
2293
|
+
* The default kind for an item that can be selected in the quick pick.
|
|
2294
|
+
*/
|
|
2255
2295
|
Default = 0,
|
|
2256
2296
|
}
|
|
2257
2297
|
|
|
2258
2298
|
/**
|
|
2259
|
-
* A concrete {@link QuickInput
|
|
2260
|
-
*
|
|
2261
|
-
*
|
|
2262
|
-
* selecting multiple items.
|
|
2299
|
+
* A concrete {@link QuickInput} to let the user pick an item from a list of items of type `T`.
|
|
2300
|
+
*
|
|
2301
|
+
* The items can be filtered through a filter text field and there is an option
|
|
2302
|
+
* {@link QuickPick.canSelectMany canSelectMany} to allow for selecting multiple items.
|
|
2263
2303
|
*
|
|
2264
|
-
* Note that in many cases the more convenient
|
|
2265
|
-
*
|
|
2266
|
-
*
|
|
2304
|
+
* Note that in many cases the more convenient {@link window.showQuickPick} is easier to use.
|
|
2305
|
+
* {@link window.createQuickPick} should be used when {@link window.showQuickPick} does not offer
|
|
2306
|
+
* the required flexibility.
|
|
2267
2307
|
*/
|
|
2268
2308
|
export interface QuickPick<T extends QuickPickItem> extends QuickInput {
|
|
2269
2309
|
|
|
2270
2310
|
/**
|
|
2271
|
-
*
|
|
2311
|
+
* The current value of the filter text.
|
|
2272
2312
|
*/
|
|
2273
2313
|
value: string;
|
|
2274
2314
|
|
|
2275
2315
|
/**
|
|
2276
|
-
* Optional placeholder in the filter text.
|
|
2316
|
+
* Optional placeholder text displayed in the filter text box when no value has been entered.
|
|
2277
2317
|
*/
|
|
2278
2318
|
placeholder: string | undefined;
|
|
2279
2319
|
|
|
2320
|
+
/**
|
|
2321
|
+
* Optional text that provides instructions or context to the user.
|
|
2322
|
+
*
|
|
2323
|
+
* The prompt is displayed below the input box and above the list of items.
|
|
2324
|
+
*/
|
|
2325
|
+
prompt: string | undefined;
|
|
2326
|
+
|
|
2280
2327
|
/**
|
|
2281
2328
|
* An event signaling when the value of the filter text has changed.
|
|
2282
2329
|
*/
|
|
@@ -2290,41 +2337,45 @@ export module '@theia/plugin' {
|
|
|
2290
2337
|
/**
|
|
2291
2338
|
* Buttons for actions in the UI.
|
|
2292
2339
|
*/
|
|
2293
|
-
buttons:
|
|
2340
|
+
buttons: readonly QuickInputButton[];
|
|
2294
2341
|
|
|
2295
2342
|
/**
|
|
2296
2343
|
* An event signaling when a button was triggered.
|
|
2344
|
+
*
|
|
2345
|
+
* This event fires for buttons stored in the {@link QuickPick.buttons buttons} array. This event does
|
|
2346
|
+
* not fire for buttons on a {@link QuickPickItem}.
|
|
2297
2347
|
*/
|
|
2298
2348
|
readonly onDidTriggerButton: Event<QuickInputButton>;
|
|
2299
2349
|
|
|
2300
2350
|
/**
|
|
2301
2351
|
* An event signaling when a button in a particular {@link QuickPickItem} was triggered.
|
|
2302
|
-
*
|
|
2352
|
+
*
|
|
2353
|
+
* This event does not fire for buttons in the title bar which are part of {@link QuickPick.buttons buttons}.
|
|
2303
2354
|
*/
|
|
2304
2355
|
readonly onDidTriggerItemButton: Event<QuickPickItemButtonEvent<T>>;
|
|
2305
2356
|
|
|
2306
2357
|
/**
|
|
2307
|
-
* Items to pick from.
|
|
2358
|
+
* Items to pick from. This can be read and updated by the extension.
|
|
2308
2359
|
*/
|
|
2309
2360
|
items: readonly T[];
|
|
2310
2361
|
|
|
2311
2362
|
/**
|
|
2312
|
-
*
|
|
2363
|
+
* Determines if multiple items can be selected at the same time. Defaults to `false`.
|
|
2313
2364
|
*/
|
|
2314
2365
|
canSelectMany: boolean;
|
|
2315
2366
|
|
|
2316
2367
|
/**
|
|
2317
|
-
*
|
|
2368
|
+
* Determines if the filter text should also be matched against the {@link QuickPickItem.description description} of the items. Defaults to `false`.
|
|
2318
2369
|
*/
|
|
2319
2370
|
matchOnDescription: boolean;
|
|
2320
2371
|
|
|
2321
2372
|
/**
|
|
2322
|
-
*
|
|
2373
|
+
* Determines if the filter text should also be matched against the {@link QuickPickItem.detail detail} of the items. Defaults to `false`.
|
|
2323
2374
|
*/
|
|
2324
2375
|
matchOnDetail: boolean;
|
|
2325
2376
|
|
|
2326
|
-
|
|
2327
|
-
*
|
|
2377
|
+
/**
|
|
2378
|
+
* Determines if the scroll position is maintained when the quick pick items are updated. Defaults to `false`.
|
|
2328
2379
|
*/
|
|
2329
2380
|
keepScrollPosition?: boolean;
|
|
2330
2381
|
|
|
@@ -2350,84 +2401,104 @@ export module '@theia/plugin' {
|
|
|
2350
2401
|
}
|
|
2351
2402
|
|
|
2352
2403
|
/**
|
|
2353
|
-
* Options
|
|
2404
|
+
* Options to configure the behavior of the quick pick UI.
|
|
2354
2405
|
*/
|
|
2355
2406
|
export interface QuickPickOptions {
|
|
2407
|
+
|
|
2356
2408
|
/**
|
|
2357
|
-
* An optional
|
|
2409
|
+
* An optional title for the quick pick.
|
|
2358
2410
|
*/
|
|
2359
2411
|
title?: string;
|
|
2360
2412
|
|
|
2361
2413
|
/**
|
|
2362
|
-
*
|
|
2414
|
+
* Determines if the {@link QuickPickItem.description description} should be included when filtering items. Defaults to `false`.
|
|
2363
2415
|
*/
|
|
2364
2416
|
matchOnDescription?: boolean;
|
|
2365
2417
|
|
|
2366
2418
|
/**
|
|
2367
|
-
*
|
|
2419
|
+
* Determines if the {@link QuickPickItem.detail detail} should be included when filtering items. Defaults to `false`.
|
|
2368
2420
|
*/
|
|
2369
2421
|
matchOnDetail?: boolean;
|
|
2370
2422
|
|
|
2371
2423
|
/**
|
|
2372
|
-
*
|
|
2424
|
+
* An optional string to show as placeholder in the input box to guide the user.
|
|
2373
2425
|
*/
|
|
2374
2426
|
placeHolder?: string;
|
|
2375
2427
|
|
|
2376
2428
|
/**
|
|
2377
|
-
*
|
|
2429
|
+
* Optional text that provides instructions or context to the user.
|
|
2430
|
+
*
|
|
2431
|
+
* The prompt is displayed below the input box and above the list of items.
|
|
2432
|
+
*/
|
|
2433
|
+
prompt?: string;
|
|
2434
|
+
|
|
2435
|
+
/**
|
|
2436
|
+
* Set to `true` to keep the picker open when focus moves to another part of the editor or to another window.
|
|
2437
|
+
* This setting is ignored on iPad and is always `false`.
|
|
2378
2438
|
*/
|
|
2379
2439
|
ignoreFocusOut?: boolean;
|
|
2380
2440
|
|
|
2381
2441
|
/**
|
|
2382
|
-
*
|
|
2383
|
-
* Not implemented yet
|
|
2442
|
+
* Determines if the picker allows multiple selections. When `true`, the result is an array of picks.
|
|
2384
2443
|
*/
|
|
2385
2444
|
canPickMany?: boolean;
|
|
2386
2445
|
|
|
2387
2446
|
/**
|
|
2388
|
-
*
|
|
2447
|
+
* An optional function that is invoked whenever an item is selected.
|
|
2389
2448
|
*/
|
|
2390
2449
|
onDidSelectItem?(item: QuickPickItem | string): any;
|
|
2391
2450
|
}
|
|
2392
2451
|
|
|
2393
2452
|
/**
|
|
2394
|
-
* Options to configure the
|
|
2453
|
+
* Options to configure the behavior of the {@link WorkspaceFolder workspace folder} pick UI.
|
|
2395
2454
|
*/
|
|
2396
2455
|
export interface WorkspaceFolderPickOptions {
|
|
2397
2456
|
|
|
2398
2457
|
/**
|
|
2399
|
-
* An optional string to show as
|
|
2458
|
+
* An optional string to show as placeholder in the input box to guide the user.
|
|
2400
2459
|
*/
|
|
2401
2460
|
placeHolder?: string;
|
|
2402
2461
|
|
|
2403
2462
|
/**
|
|
2404
2463
|
* Set to `true` to keep the picker open when focus moves to another part of the editor or to another window.
|
|
2464
|
+
* This setting is ignored on iPad and is always `false`.
|
|
2405
2465
|
*/
|
|
2406
2466
|
ignoreFocusOut?: boolean;
|
|
2407
2467
|
}
|
|
2408
2468
|
|
|
2409
2469
|
/**
|
|
2410
|
-
*
|
|
2470
|
+
* Severity levels for input box validation messages.
|
|
2411
2471
|
*/
|
|
2412
2472
|
export enum InputBoxValidationSeverity {
|
|
2473
|
+
/**
|
|
2474
|
+
* Indicates an informational message that does not prevent input acceptance.
|
|
2475
|
+
*/
|
|
2413
2476
|
Info = 1,
|
|
2477
|
+
/**
|
|
2478
|
+
* Indicates a warning message that does not prevent input acceptance.
|
|
2479
|
+
*/
|
|
2414
2480
|
Warning = 2,
|
|
2481
|
+
/**
|
|
2482
|
+
* Indicates an error message that prevents the user from accepting the input.
|
|
2483
|
+
*/
|
|
2415
2484
|
Error = 3
|
|
2416
2485
|
}
|
|
2417
2486
|
|
|
2418
2487
|
/**
|
|
2419
|
-
*
|
|
2488
|
+
* Represents a validation message for an {@link InputBox}.
|
|
2420
2489
|
*/
|
|
2421
2490
|
export interface InputBoxValidationMessage {
|
|
2422
2491
|
/**
|
|
2423
|
-
* The validation message to display.
|
|
2492
|
+
* The validation message to display to the user.
|
|
2424
2493
|
*/
|
|
2425
2494
|
readonly message: string;
|
|
2426
2495
|
|
|
2427
2496
|
/**
|
|
2428
|
-
* The severity of the validation message.
|
|
2429
|
-
*
|
|
2430
|
-
*
|
|
2497
|
+
* The severity level of the validation message.
|
|
2498
|
+
*
|
|
2499
|
+
* **Note:** When using {@link InputBoxValidationSeverity.Error}, the user will not be able to accept
|
|
2500
|
+
* the input (e.g., by pressing Enter). {@link InputBoxValidationSeverity.Info Info} and
|
|
2501
|
+
* {@link InputBoxValidationSeverity.Warning Warning} severities will still allow the input to be accepted.
|
|
2431
2502
|
*/
|
|
2432
2503
|
readonly severity: InputBoxValidationSeverity;
|
|
2433
2504
|
}
|
|
@@ -2976,7 +3047,7 @@ export module '@theia/plugin' {
|
|
|
2976
3047
|
}
|
|
2977
3048
|
|
|
2978
3049
|
/**
|
|
2979
|
-
* Options to configure the
|
|
3050
|
+
* Options to configure the behavior of a file open dialog.
|
|
2980
3051
|
*
|
|
2981
3052
|
* * Note 1: A dialog can select files, folders, or both. This is not true for Windows
|
|
2982
3053
|
* which enforces to open either files or folder, but *not both*.
|
|
@@ -3180,7 +3251,7 @@ export module '@theia/plugin' {
|
|
|
3180
3251
|
*
|
|
3181
3252
|
* Note that the possible values are currently defined as any of the following:
|
|
3182
3253
|
* 'bash', 'cmd', 'csh', 'fish', 'gitbash', 'julia', 'ksh', 'node', 'nu', 'pwsh', 'python',
|
|
3183
|
-
* 'sh', 'wsl', 'zsh'.
|
|
3254
|
+
* 'sh', 'wsl', 'xonsh', 'zsh'.
|
|
3184
3255
|
*/
|
|
3185
3256
|
readonly shell: string | undefined;
|
|
3186
3257
|
}
|
|
@@ -4758,7 +4829,7 @@ export module '@theia/plugin' {
|
|
|
4758
4829
|
/**
|
|
4759
4830
|
* A panel that contains a webview.
|
|
4760
4831
|
*/
|
|
4761
|
-
interface WebviewPanel {
|
|
4832
|
+
export interface WebviewPanel {
|
|
4762
4833
|
/**
|
|
4763
4834
|
* Identifies the type of the webview panel, such as `'markdown.preview'`.
|
|
4764
4835
|
*/
|
|
@@ -4772,10 +4843,10 @@ export module '@theia/plugin' {
|
|
|
4772
4843
|
/**
|
|
4773
4844
|
* Icon for the panel shown in UI.
|
|
4774
4845
|
*/
|
|
4775
|
-
iconPath?:
|
|
4846
|
+
iconPath?: IconPath;
|
|
4776
4847
|
|
|
4777
4848
|
/**
|
|
4778
|
-
* Webview belonging to the panel.
|
|
4849
|
+
* {@linkcode Webview} belonging to the panel.
|
|
4779
4850
|
*/
|
|
4780
4851
|
readonly webview: Webview;
|
|
4781
4852
|
|
|
@@ -4784,15 +4855,11 @@ export module '@theia/plugin' {
|
|
|
4784
4855
|
*/
|
|
4785
4856
|
readonly options: WebviewPanelOptions;
|
|
4786
4857
|
|
|
4787
|
-
/**
|
|
4788
|
-
* Settings to determine where webview panel will be reside
|
|
4789
|
-
*/
|
|
4790
|
-
readonly showOptions?: WebviewPanelShowOptions;
|
|
4791
4858
|
/**
|
|
4792
4859
|
* Editor position of the panel. This property is only set if the webview is in
|
|
4793
4860
|
* one of the editor view columns.
|
|
4794
4861
|
*/
|
|
4795
|
-
readonly viewColumn
|
|
4862
|
+
readonly viewColumn: ViewColumn | undefined;
|
|
4796
4863
|
|
|
4797
4864
|
/**
|
|
4798
4865
|
* Whether the panel is active (focused by the user).
|
|
@@ -5546,7 +5613,7 @@ export module '@theia/plugin' {
|
|
|
5546
5613
|
* @param items An array of strings, or a promise that resolves to an array of strings.
|
|
5547
5614
|
* @param options Configures the behavior of the selection list.
|
|
5548
5615
|
* @param token A token that can be used to signal cancellation.
|
|
5549
|
-
* @
|
|
5616
|
+
* @returns A thenable that resolves to the selected items or `undefined`.
|
|
5550
5617
|
*/
|
|
5551
5618
|
export function showQuickPick(items: readonly string[] | Thenable<readonly string[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<string | undefined>;
|
|
5552
5619
|
|
|
@@ -5556,7 +5623,7 @@ export module '@theia/plugin' {
|
|
|
5556
5623
|
* @param items An array of strings, or a promise that resolves to an array of strings.
|
|
5557
5624
|
* @param options Configures the behavior of the selection list.
|
|
5558
5625
|
* @param token A token that can be used to signal cancellation.
|
|
5559
|
-
* @
|
|
5626
|
+
* @returns A thenable that resolves to the selected string or `undefined`.
|
|
5560
5627
|
*/
|
|
5561
5628
|
export function showQuickPick(items: readonly string[] | Thenable<readonly string[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable<string[] | undefined>;
|
|
5562
5629
|
|
|
@@ -5566,7 +5633,7 @@ export module '@theia/plugin' {
|
|
|
5566
5633
|
* @param items An array of items, or a promise that resolves to an array of items.
|
|
5567
5634
|
* @param options Configures the behavior of the selection list.
|
|
5568
5635
|
* @param token A token that can be used to signal cancellation.
|
|
5569
|
-
* @
|
|
5636
|
+
* @returns A thenable that resolves to the selected item or `undefined`.
|
|
5570
5637
|
*/
|
|
5571
5638
|
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<T | undefined>;
|
|
5572
5639
|
|
|
@@ -5581,14 +5648,13 @@ export module '@theia/plugin' {
|
|
|
5581
5648
|
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable<T[] | undefined>;
|
|
5582
5649
|
|
|
5583
5650
|
/**
|
|
5584
|
-
* Creates a {@link QuickPick
|
|
5585
|
-
* of items of type T.
|
|
5651
|
+
* Creates a {@link QuickPick} to let the user pick an item from a list of items of type `T`.
|
|
5586
5652
|
*
|
|
5587
|
-
* Note that in many cases the more convenient
|
|
5588
|
-
*
|
|
5589
|
-
*
|
|
5653
|
+
* Note that in many cases the more convenient {@link window.showQuickPick} is easier to use.
|
|
5654
|
+
* {@link window.createQuickPick} should be used when {@link window.showQuickPick} does not offer
|
|
5655
|
+
* the required flexibility.
|
|
5590
5656
|
*
|
|
5591
|
-
* @
|
|
5657
|
+
* @returns A new {@link QuickPick}.
|
|
5592
5658
|
*/
|
|
5593
5659
|
export function createQuickPick<T extends QuickPickItem>(): QuickPick<T>;
|
|
5594
5660
|
|
|
@@ -5718,13 +5784,13 @@ export module '@theia/plugin' {
|
|
|
5718
5784
|
/**
|
|
5719
5785
|
* Opens an input box to ask the user for input.
|
|
5720
5786
|
*
|
|
5721
|
-
* The returned value will be `undefined` if the input box was canceled (e.g
|
|
5787
|
+
* The returned value will be `undefined` if the input box was canceled (e.g., pressing ESC). Otherwise the
|
|
5722
5788
|
* returned value will be the string typed by the user or an empty string if the user did not type
|
|
5723
5789
|
* anything but dismissed the input box with OK.
|
|
5724
5790
|
*
|
|
5725
5791
|
* @param options Configures the behavior of the input box.
|
|
5726
5792
|
* @param token A token that can be used to signal cancellation.
|
|
5727
|
-
* @
|
|
5793
|
+
* @returns A thenable that resolves to a string the user provided or to `undefined` in case of dismissal.
|
|
5728
5794
|
*/
|
|
5729
5795
|
export function showInputBox(options?: InputBoxOptions, token?: CancellationToken): Thenable<string | undefined>;
|
|
5730
5796
|
|
|
@@ -6069,13 +6135,13 @@ export module '@theia/plugin' {
|
|
|
6069
6135
|
export function withProgress<R>(options: ProgressOptions, task: (progress: Progress<{ message?: string; increment?: number }>, token: CancellationToken) => Thenable<R>): Thenable<R>;
|
|
6070
6136
|
|
|
6071
6137
|
/**
|
|
6072
|
-
* Creates a {@link InputBox
|
|
6138
|
+
* Creates a {@link InputBox} to let the user enter some text input.
|
|
6073
6139
|
*
|
|
6074
|
-
* Note that in many cases the more convenient
|
|
6075
|
-
*
|
|
6076
|
-
*
|
|
6140
|
+
* Note that in many cases the more convenient {@link window.showInputBox} is easier to use.
|
|
6141
|
+
* {@link window.createInputBox} should be used when {@link window.showInputBox} does not offer
|
|
6142
|
+
* the required flexibility.
|
|
6077
6143
|
*
|
|
6078
|
-
* @
|
|
6144
|
+
* @returns A new {@link InputBox}.
|
|
6079
6145
|
*/
|
|
6080
6146
|
export function createInputBox(): InputBox;
|
|
6081
6147
|
|
|
@@ -6133,15 +6199,14 @@ export module '@theia/plugin' {
|
|
|
6133
6199
|
}
|
|
6134
6200
|
|
|
6135
6201
|
/**
|
|
6136
|
-
* Predefined buttons for {@link QuickPick
|
|
6202
|
+
* Predefined buttons for {@link QuickPick} and {@link InputBox}.
|
|
6137
6203
|
*/
|
|
6138
6204
|
export class QuickInputButtons {
|
|
6139
|
-
|
|
6140
6205
|
/**
|
|
6141
|
-
* A back button for {@link QuickPick
|
|
6206
|
+
* A predefined back button for {@link QuickPick} and {@link InputBox}.
|
|
6142
6207
|
*
|
|
6143
|
-
*
|
|
6144
|
-
*
|
|
6208
|
+
* This button should be used for consistency when a navigation back button is needed. It comes
|
|
6209
|
+
* with a predefined icon, tooltip, and location.
|
|
6145
6210
|
*/
|
|
6146
6211
|
static readonly Back: QuickInputButton;
|
|
6147
6212
|
|
|
@@ -6152,12 +6217,11 @@ export module '@theia/plugin' {
|
|
|
6152
6217
|
}
|
|
6153
6218
|
|
|
6154
6219
|
/**
|
|
6155
|
-
* An event
|
|
6156
|
-
* This event does not fire for buttons in the title bar.
|
|
6220
|
+
* An event describing a button that was pressed on a {@link QuickPickItem}.
|
|
6157
6221
|
*/
|
|
6158
6222
|
export interface QuickPickItemButtonEvent<T extends QuickPickItem> {
|
|
6159
6223
|
/**
|
|
6160
|
-
* The button that was
|
|
6224
|
+
* The button that was pressed.
|
|
6161
6225
|
*/
|
|
6162
6226
|
readonly button: QuickInputButton;
|
|
6163
6227
|
/**
|
|
@@ -6167,39 +6231,40 @@ export module '@theia/plugin' {
|
|
|
6167
6231
|
}
|
|
6168
6232
|
|
|
6169
6233
|
/**
|
|
6170
|
-
* A concrete {@link QuickInput
|
|
6234
|
+
* A concrete {@link QuickInput} to let the user input a text value.
|
|
6171
6235
|
*
|
|
6172
|
-
* Note that in many cases the more convenient
|
|
6173
|
-
*
|
|
6174
|
-
*
|
|
6236
|
+
* Note that in many cases the more convenient {@link window.showInputBox} is easier to use.
|
|
6237
|
+
* {@link window.createInputBox} should be used when {@link window.showInputBox} does not offer
|
|
6238
|
+
* the required flexibility.
|
|
6175
6239
|
*/
|
|
6176
6240
|
export interface InputBox extends QuickInput {
|
|
6177
6241
|
|
|
6178
6242
|
/**
|
|
6179
|
-
*
|
|
6243
|
+
* The current input value.
|
|
6180
6244
|
*/
|
|
6181
6245
|
value: string;
|
|
6182
6246
|
|
|
6183
6247
|
/**
|
|
6184
|
-
*
|
|
6248
|
+
* Selection range in the input value.
|
|
6249
|
+
*
|
|
6250
|
+
* Defined as tuple of two numbers where the first is the inclusive start index and the second the
|
|
6251
|
+
* exclusive end index. When `undefined` the whole pre-filled value will be selected, when empty
|
|
6252
|
+
* (start equals end) only the cursor will be set, otherwise the defined range will be selected.
|
|
6253
|
+
*
|
|
6254
|
+
* This property does not get updated when the user types or makes a selection, but it can be updated
|
|
6255
|
+
* by the extension.
|
|
6185
6256
|
*/
|
|
6186
|
-
|
|
6257
|
+
valueSelection: readonly [number, number] | undefined;
|
|
6187
6258
|
|
|
6188
6259
|
/**
|
|
6189
|
-
*
|
|
6260
|
+
* Optional placeholder text shown when no value has been input.
|
|
6190
6261
|
*/
|
|
6191
|
-
|
|
6262
|
+
placeholder: string | undefined;
|
|
6192
6263
|
|
|
6193
6264
|
/**
|
|
6194
|
-
*
|
|
6195
|
-
* first is the inclusive start index and the second the exclusive end index. When `undefined` the whole
|
|
6196
|
-
* pre-filled value will be selected, when empty (start equals end) only the cursor will be set,
|
|
6197
|
-
* otherwise the defined range will be selected.
|
|
6198
|
-
*
|
|
6199
|
-
* This property does not get updated when the user types or makes a selection,
|
|
6200
|
-
* but it can be updated by the extension.
|
|
6265
|
+
* Determines if the input value should be hidden. Defaults to `false`.
|
|
6201
6266
|
*/
|
|
6202
|
-
|
|
6267
|
+
password: boolean;
|
|
6203
6268
|
|
|
6204
6269
|
/**
|
|
6205
6270
|
* An event signaling when the value has changed.
|
|
@@ -6228,114 +6293,115 @@ export module '@theia/plugin' {
|
|
|
6228
6293
|
|
|
6229
6294
|
/**
|
|
6230
6295
|
* An optional validation message indicating a problem with the current input value.
|
|
6231
|
-
*
|
|
6232
|
-
*
|
|
6296
|
+
*
|
|
6297
|
+
* By setting a string, the InputBox will use a default {@link InputBoxValidationSeverity} of Error.
|
|
6298
|
+
* Returning `undefined` clears the validation message.
|
|
6233
6299
|
*/
|
|
6234
6300
|
validationMessage: string | InputBoxValidationMessage | undefined;
|
|
6235
6301
|
}
|
|
6236
6302
|
|
|
6237
6303
|
/**
|
|
6238
|
-
*
|
|
6239
|
-
*
|
|
6240
|
-
*
|
|
6304
|
+
* The base interface for all quick input types.
|
|
6305
|
+
*
|
|
6306
|
+
* Quick input provides a unified way for extensions to interact with users through simple UI elements.
|
|
6307
|
+
* A quick input UI is initially not visible. After configuring it through its properties the extension
|
|
6308
|
+
* can make it visible by calling {@link QuickInput.show show}.
|
|
6241
6309
|
*
|
|
6242
|
-
* There are several reasons why this UI might have to be hidden and
|
|
6243
|
-
*
|
|
6244
|
-
*
|
|
6245
|
-
* the user pressing Esc, some other input UI opening, etc.)
|
|
6310
|
+
* There are several reasons why this UI might have to be hidden and the extension will be notified
|
|
6311
|
+
* through {@link QuickInput.onDidHide onDidHide}. Examples include: an explicit call to
|
|
6312
|
+
* {@link QuickInput.hide hide}, the user pressing Esc, some other input UI opening, etc.
|
|
6246
6313
|
*
|
|
6247
|
-
* A user pressing Enter or some other gesture implying acceptance
|
|
6248
|
-
*
|
|
6249
|
-
*
|
|
6250
|
-
* and if the UI should indeed be hidden through a call to [QuickInput.hide](#QuickInput.hide).
|
|
6314
|
+
* A user pressing Enter or some other gesture implying acceptance of the current state does not
|
|
6315
|
+
* automatically hide this UI component. It is up to the extension to decide whether to accept the
|
|
6316
|
+
* user's input and if the UI should indeed be hidden through a call to {@link QuickInput.hide hide}.
|
|
6251
6317
|
*
|
|
6252
|
-
* When the extension no longer needs this input UI, it should
|
|
6253
|
-
*
|
|
6254
|
-
* any resources associated with it.
|
|
6318
|
+
* When the extension no longer needs this input UI, it should {@link QuickInput.dispose dispose} it
|
|
6319
|
+
* to allow for freeing up any resources associated with it.
|
|
6255
6320
|
*
|
|
6256
|
-
* See {@link QuickPick
|
|
6321
|
+
* See {@link QuickPick} and {@link InputBox} for concrete UIs.
|
|
6257
6322
|
*/
|
|
6258
6323
|
export interface QuickInput {
|
|
6259
6324
|
|
|
6260
6325
|
/**
|
|
6261
|
-
* An optional title.
|
|
6326
|
+
* An optional title for the input UI.
|
|
6262
6327
|
*/
|
|
6263
6328
|
title: string | undefined;
|
|
6264
6329
|
|
|
6265
6330
|
/**
|
|
6266
|
-
* An optional current step count.
|
|
6331
|
+
* An optional current step count for multi-step input flows.
|
|
6267
6332
|
*/
|
|
6268
6333
|
step: number | undefined;
|
|
6269
6334
|
|
|
6270
6335
|
/**
|
|
6271
|
-
* An optional total step count.
|
|
6336
|
+
* An optional total step count for multi-step input flows.
|
|
6272
6337
|
*/
|
|
6273
6338
|
totalSteps: number | undefined;
|
|
6274
6339
|
|
|
6275
6340
|
/**
|
|
6276
|
-
*
|
|
6341
|
+
* Determines if the UI should allow for user input. Defaults to `true`.
|
|
6277
6342
|
*
|
|
6278
|
-
* Change this to false,
|
|
6279
|
-
*
|
|
6343
|
+
* Change this to `false`, for example, while validating user input or loading data for the next
|
|
6344
|
+
* step in user input.
|
|
6280
6345
|
*/
|
|
6281
6346
|
enabled: boolean;
|
|
6282
6347
|
|
|
6283
6348
|
/**
|
|
6284
|
-
*
|
|
6349
|
+
* Determines if the UI should show a progress indicator. Defaults to `false`.
|
|
6285
6350
|
*
|
|
6286
|
-
* Change this to true,
|
|
6287
|
-
* user input.
|
|
6351
|
+
* Change this to `true`, for example, while loading more data or validating user input.
|
|
6288
6352
|
*/
|
|
6289
6353
|
busy: boolean;
|
|
6290
6354
|
|
|
6291
6355
|
/**
|
|
6292
|
-
*
|
|
6356
|
+
* Determines if the UI should stay open even when losing UI focus. Defaults to `false`.
|
|
6357
|
+
* This setting is ignored on iPad and is always `false`.
|
|
6293
6358
|
*/
|
|
6294
6359
|
ignoreFocusOut: boolean;
|
|
6295
6360
|
|
|
6296
6361
|
/**
|
|
6297
|
-
* Makes the input UI visible in its current configuration.
|
|
6298
|
-
*
|
|
6362
|
+
* Makes the input UI visible in its current configuration.
|
|
6363
|
+
*
|
|
6364
|
+
* Any other input UI will first fire an {@link QuickInput.onDidHide onDidHide} event.
|
|
6299
6365
|
*/
|
|
6300
6366
|
show(): void;
|
|
6301
6367
|
|
|
6302
6368
|
/**
|
|
6303
|
-
* Hides this input UI.
|
|
6304
|
-
*
|
|
6369
|
+
* Hides this input UI.
|
|
6370
|
+
*
|
|
6371
|
+
* This will also fire an {@link QuickInput.onDidHide onDidHide} event.
|
|
6305
6372
|
*/
|
|
6306
6373
|
hide(): void;
|
|
6307
6374
|
|
|
6308
6375
|
/**
|
|
6309
6376
|
* An event signaling when this input UI is hidden.
|
|
6310
6377
|
*
|
|
6311
|
-
* There are several reasons why this UI might have to be hidden and
|
|
6312
|
-
*
|
|
6313
|
-
*
|
|
6314
|
-
* the user pressing Esc, some other input UI opening, etc.)
|
|
6378
|
+
* There are several reasons why this UI might have to be hidden and the extension will be notified
|
|
6379
|
+
* through {@link QuickInput.onDidHide onDidHide}. Examples include: an explicit call to
|
|
6380
|
+
* {@link QuickInput.hide hide}, the user pressing Esc, some other input UI opening, etc.
|
|
6315
6381
|
*/
|
|
6316
6382
|
readonly onDidHide: Event<void>;
|
|
6317
6383
|
|
|
6318
6384
|
/**
|
|
6319
|
-
* Dispose of this input UI and any associated resources.
|
|
6320
|
-
*
|
|
6321
|
-
*
|
|
6322
|
-
* accessed. Instead a new input UI should
|
|
6385
|
+
* Dispose of this input UI and any associated resources.
|
|
6386
|
+
*
|
|
6387
|
+
* If it is still visible, it is first hidden. After this call the input UI is no longer functional
|
|
6388
|
+
* and no additional methods or properties on it should be accessed. Instead a new input UI should
|
|
6389
|
+
* be created.
|
|
6323
6390
|
*/
|
|
6324
6391
|
dispose(): void;
|
|
6325
6392
|
}
|
|
6326
6393
|
|
|
6327
6394
|
/**
|
|
6328
|
-
*
|
|
6395
|
+
* A button for an action in a {@link QuickPick} or {@link InputBox}.
|
|
6329
6396
|
*/
|
|
6330
6397
|
export interface QuickInputButton {
|
|
6331
|
-
|
|
6332
6398
|
/**
|
|
6333
|
-
*
|
|
6399
|
+
* The icon for the button.
|
|
6334
6400
|
*/
|
|
6335
6401
|
readonly iconPath: IconPath;
|
|
6336
6402
|
|
|
6337
6403
|
/**
|
|
6338
|
-
* An optional tooltip.
|
|
6404
|
+
* An optional tooltip displayed when hovering over the button.
|
|
6339
6405
|
*/
|
|
6340
6406
|
readonly tooltip?: string | undefined;
|
|
6341
6407
|
}
|
|
@@ -6955,10 +7021,13 @@ export module '@theia/plugin' {
|
|
|
6955
7021
|
description?: string | boolean;
|
|
6956
7022
|
|
|
6957
7023
|
/**
|
|
6958
|
-
*
|
|
7024
|
+
* A {@link Uri} representing the resource associated with this item.
|
|
6959
7025
|
*
|
|
6960
|
-
*
|
|
6961
|
-
*
|
|
7026
|
+
* When set, this property is used to automatically derive several item properties if they are not explicitly provided:
|
|
7027
|
+
* - **Label**: Derived from the resource's file name when {@link TreeItem.label label} is not provided.
|
|
7028
|
+
* - **Description**: Derived from the resource's path when {@link TreeItem.description description} is set to `true`.
|
|
7029
|
+
* - **Icon**: Derived from the current file icon theme when {@link TreeItem.iconPath iconPath} is set to
|
|
7030
|
+
* {@link ThemeIcon.File} or {@link ThemeIcon.Folder}.
|
|
6962
7031
|
*/
|
|
6963
7032
|
resourceUri?: Uri;
|
|
6964
7033
|
|
|
@@ -8257,6 +8326,11 @@ export module '@theia/plugin' {
|
|
|
8257
8326
|
*/
|
|
8258
8327
|
export const onDidGrantWorkspaceTrust: Event<void>;
|
|
8259
8328
|
|
|
8329
|
+
/**
|
|
8330
|
+
* Event that fires when the workspace trust state changes.
|
|
8331
|
+
*/
|
|
8332
|
+
export const onDidChangeWorkspaceTrust: Event<boolean>;
|
|
8333
|
+
|
|
8260
8334
|
/**
|
|
8261
8335
|
* Decodes the content from a `Uint8Array` to a `string`. You MUST
|
|
8262
8336
|
* provide the entire content at once to ensure that the encoding
|
|
@@ -12550,6 +12624,29 @@ export module '@theia/plugin' {
|
|
|
12550
12624
|
dispose(): void;
|
|
12551
12625
|
}
|
|
12552
12626
|
|
|
12627
|
+
export interface ScmActionButton {
|
|
12628
|
+
/**
|
|
12629
|
+
* The primary command for this action button.
|
|
12630
|
+
*/
|
|
12631
|
+
readonly command: Command;
|
|
12632
|
+
|
|
12633
|
+
/**
|
|
12634
|
+
* Secondary commands that appear in a dropdown menu.
|
|
12635
|
+
* Each inner array represents a group of commands (separated by dividers).
|
|
12636
|
+
*/
|
|
12637
|
+
readonly secondaryCommands?: Command[][];
|
|
12638
|
+
|
|
12639
|
+
/**
|
|
12640
|
+
* Whether this action button is enabled.
|
|
12641
|
+
*/
|
|
12642
|
+
readonly enabled: boolean;
|
|
12643
|
+
|
|
12644
|
+
/**
|
|
12645
|
+
* Optional description shown next to the button.
|
|
12646
|
+
*/
|
|
12647
|
+
readonly description?: string;
|
|
12648
|
+
}
|
|
12649
|
+
|
|
12553
12650
|
/**
|
|
12554
12651
|
* An source control is able to provide {@link SourceControlResourceState resource states}
|
|
12555
12652
|
* to the editor and interact with the editor in several source control related ways.
|
|
@@ -12618,6 +12715,11 @@ export module '@theia/plugin' {
|
|
|
12618
12715
|
*/
|
|
12619
12716
|
createResourceGroup(id: string, label: string): SourceControlResourceGroup;
|
|
12620
12717
|
|
|
12718
|
+
/**
|
|
12719
|
+
* Optional action button displayed under the source control's input box.
|
|
12720
|
+
*/
|
|
12721
|
+
actionButton?: ScmActionButton;
|
|
12722
|
+
|
|
12621
12723
|
/**
|
|
12622
12724
|
* Dispose this source control.
|
|
12623
12725
|
*/
|
|
@@ -15410,7 +15512,7 @@ export module '@theia/plugin' {
|
|
|
15410
15512
|
* @returns localized string with injected arguments.
|
|
15411
15513
|
* @example `l10n.t('Hello {name}', { name: 'Erich' });`
|
|
15412
15514
|
*/
|
|
15413
|
-
export function t(message: string, args: Record<string,
|
|
15515
|
+
export function t(message: string, args: Record<string, string | number | boolean>): string;
|
|
15414
15516
|
/**
|
|
15415
15517
|
* Marks a string for localization. If a localized bundle is available for the language specified by
|
|
15416
15518
|
* {@link env.language} and the bundle has a localized value for this message, then that localized
|
|
@@ -15420,18 +15522,18 @@ export module '@theia/plugin' {
|
|
|
15420
15522
|
*/
|
|
15421
15523
|
export function t(options: {
|
|
15422
15524
|
/**
|
|
15423
|
-
* The message to localize. If {@link args} is an array, this message supports index templating where strings like
|
|
15424
|
-
* `{0}` and `{1}` are replaced by the item at that index in the {@link args} array. If `args` is a `Record
|
|
15525
|
+
* The message to localize. If {@link options.args args} is an array, this message supports index templating where strings like
|
|
15526
|
+
* `{0}` and `{1}` are replaced by the item at that index in the {@link options.args args} array. If `args` is a `Record`,
|
|
15425
15527
|
* this supports named templating where strings like `{foo}` and `{bar}` are replaced by the value in
|
|
15426
15528
|
* the Record for that key (foo, bar, etc).
|
|
15427
15529
|
*/
|
|
15428
15530
|
message: string;
|
|
15429
15531
|
/**
|
|
15430
15532
|
* The arguments to be used in the localized string. As an array, the index of the argument is used to
|
|
15431
|
-
* match the template placeholder in the localized string. As a Record
|
|
15533
|
+
* match the template placeholder in the localized string. As a `Record`, the key is used to match the template
|
|
15432
15534
|
* placeholder in the localized string.
|
|
15433
15535
|
*/
|
|
15434
|
-
args?: Array<string | number | boolean> | Record<string,
|
|
15536
|
+
args?: Array<string | number | boolean> | Record<string, string | number | boolean>;
|
|
15435
15537
|
/**
|
|
15436
15538
|
* A comment to help translators understand the context of the message.
|
|
15437
15539
|
*/
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2025 EclipseSource GmbH and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
/*---------------------------------------------------------------------------------------------
|
|
18
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
+
*--------------------------------------------------------------------------------------------*/
|
|
21
|
+
|
|
22
|
+
// Copied from https://github.com/microsoft/vscode/blob/1.104.0/src/vscode-dts/vscode.proposed.editorHoverVerbosityLevel.d.ts
|
|
23
|
+
|
|
24
|
+
export module '@theia/plugin' {
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A hover represents additional information for a symbol or word. Hovers are
|
|
28
|
+
* rendered in a tooltip-like widget.
|
|
29
|
+
*/
|
|
30
|
+
export class VerboseHover extends Hover {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Can increase the verbosity of the hover
|
|
34
|
+
*/
|
|
35
|
+
canIncreaseVerbosity?: boolean;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Can decrease the verbosity of the hover
|
|
39
|
+
*/
|
|
40
|
+
canDecreaseVerbosity?: boolean;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Creates a new hover object.
|
|
44
|
+
*
|
|
45
|
+
* @param contents The contents of the hover.
|
|
46
|
+
* @param range The range to which the hover applies.
|
|
47
|
+
*/
|
|
48
|
+
constructor(contents: MarkdownString | MarkedString | Array<MarkdownString | MarkedString>, range?: Range, canIncreaseVerbosity?: boolean, canDecreaseVerbosity?: boolean);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface HoverContext {
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The delta by which to increase/decrease the hover verbosity level
|
|
55
|
+
*/
|
|
56
|
+
readonly verbosityDelta?: number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The previous hover sent for the same position
|
|
60
|
+
*/
|
|
61
|
+
readonly previousHover?: Hover;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export enum HoverVerbosityAction {
|
|
65
|
+
/**
|
|
66
|
+
* Increase the hover verbosity
|
|
67
|
+
*/
|
|
68
|
+
Increase = 0,
|
|
69
|
+
/**
|
|
70
|
+
* Decrease the hover verbosity
|
|
71
|
+
*/
|
|
72
|
+
Decrease = 1
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The hover provider class
|
|
77
|
+
*/
|
|
78
|
+
export interface HoverProvider {
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Provide a hover for the given position and document. Multiple hovers at the same
|
|
82
|
+
* position will be merged by the editor. A hover can have a range which defaults
|
|
83
|
+
* to the word range at the position when omitted.
|
|
84
|
+
*
|
|
85
|
+
* @param document The document in which the command was invoked.
|
|
86
|
+
* @param position The position at which the command was invoked.
|
|
87
|
+
* @param token A cancellation token.
|
|
88
|
+
* @oaram context A hover context.
|
|
89
|
+
* @returns A hover or a thenable that resolves to such. The lack of a result can be
|
|
90
|
+
* signaled by returning `undefined` or `null`.
|
|
91
|
+
*/
|
|
92
|
+
provideHover(document: TextDocument, position: Position, token: CancellationToken, context?: HoverContext): ProviderResult<VerboseHover>;
|
|
93
|
+
}
|
|
94
|
+
}
|