@theia/plugin 1.27.0-next.67 → 1.27.0-next.68
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 +2 -2
- package/src/theia-proposed.d.ts +2 -2
- package/src/theia.d.ts +79 -61
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.27.0-next.
|
|
3
|
+
"version": "1.27.0-next.68+158937af474",
|
|
4
4
|
"description": "Theia - Plugin API",
|
|
5
5
|
"types": "./src/theia.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "158937af47459aea882be0b034bbf144dd1a23ce"
|
|
36
36
|
}
|
package/src/theia-proposed.d.ts
CHANGED
|
@@ -161,7 +161,7 @@ export module '@theia/plugin' {
|
|
|
161
161
|
* Get the keybindings associated to commandId.
|
|
162
162
|
* @param commandId The ID of the command for which we are looking for keybindings.
|
|
163
163
|
*/
|
|
164
|
-
export function getKeyBinding(commandId: string):
|
|
164
|
+
export function getKeyBinding(commandId: string): Thenable<CommandKeyBinding[] | undefined>;
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
167
|
* Registers a diff information command that can be invoked via a keyboard shortcut,
|
|
@@ -210,7 +210,7 @@ export module '@theia/plugin' {
|
|
|
210
210
|
* Returns the type of the operating system on the client side (like browser'OS if using browser mode). If it is neither [Windows](isWindows) nor [OS X](isOSX), then
|
|
211
211
|
* it always return with the `Linux` OS type.
|
|
212
212
|
*/
|
|
213
|
-
export function getClientOperatingSystem():
|
|
213
|
+
export function getClientOperatingSystem(): Thenable<OperatingSystem>;
|
|
214
214
|
|
|
215
215
|
}
|
|
216
216
|
|
package/src/theia.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export module '@theia/plugin' {
|
|
|
112
112
|
*
|
|
113
113
|
* @return A promise that will resolve when this plug-in has been activated.
|
|
114
114
|
*/
|
|
115
|
-
activate():
|
|
115
|
+
activate(): Thenable<T>;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
/**
|
|
@@ -1182,7 +1182,7 @@ export module '@theia/plugin' {
|
|
|
1182
1182
|
* @param options The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit.
|
|
1183
1183
|
* @return A promise that resolves with a value indicating if the edits could be applied.
|
|
1184
1184
|
*/
|
|
1185
|
-
edit(callback: (editBuilder: TextEditorEdit) => void, options?: { undoStopBefore: boolean; undoStopAfter: boolean; }):
|
|
1185
|
+
edit(callback: (editBuilder: TextEditorEdit) => void, options?: { undoStopBefore: boolean; undoStopAfter: boolean; }): Thenable<boolean>;
|
|
1186
1186
|
|
|
1187
1187
|
/**
|
|
1188
1188
|
* Insert a [snippet](#SnippetString) and put the editor into snippet mode. "Snippet mode"
|
|
@@ -1195,7 +1195,7 @@ export module '@theia/plugin' {
|
|
|
1195
1195
|
* @return A promise that resolves with a value indicating if the snippet could be inserted. Note that the promise does not signal
|
|
1196
1196
|
* that the snippet is completely filled-in or accepted.
|
|
1197
1197
|
*/
|
|
1198
|
-
insertSnippet(snippet: SnippetString, location?: Position | Range | Position[] | Range[], options?: { undoStopBefore: boolean; undoStopAfter: boolean; }):
|
|
1198
|
+
insertSnippet(snippet: SnippetString, location?: Position | Range | Position[] | Range[], options?: { undoStopBefore: boolean; undoStopAfter: boolean; }): Thenable<boolean>;
|
|
1199
1199
|
|
|
1200
1200
|
/**
|
|
1201
1201
|
* Adds a set of decorations to the text editor. If a set of decorations already exists with
|
|
@@ -1674,7 +1674,7 @@ export module '@theia/plugin' {
|
|
|
1674
1674
|
*
|
|
1675
1675
|
* @param thenable A thenable that resolves to [pre-save-edits](#TextEdit).
|
|
1676
1676
|
*/
|
|
1677
|
-
waitUntil(thenable:
|
|
1677
|
+
waitUntil(thenable: Thenable<TextEdit[]>): void;
|
|
1678
1678
|
|
|
1679
1679
|
/**
|
|
1680
1680
|
* Allows to pause the event loop until the provided thenable resolved.
|
|
@@ -1683,7 +1683,7 @@ export module '@theia/plugin' {
|
|
|
1683
1683
|
*
|
|
1684
1684
|
* @param thenable A thenable that delays saving.
|
|
1685
1685
|
*/
|
|
1686
|
-
waitUntil(thenable:
|
|
1686
|
+
waitUntil(thenable: Thenable<any>): void;
|
|
1687
1687
|
}
|
|
1688
1688
|
|
|
1689
1689
|
/**
|
|
@@ -2471,7 +2471,7 @@ export module '@theia/plugin' {
|
|
|
2471
2471
|
*
|
|
2472
2472
|
* Reject if a command cannot be executed.
|
|
2473
2473
|
*/
|
|
2474
|
-
export function executeCommand<T>(commandId: string, ...args: any[]):
|
|
2474
|
+
export function executeCommand<T>(commandId: string, ...args: any[]): Thenable<T | undefined>;
|
|
2475
2475
|
|
|
2476
2476
|
/**
|
|
2477
2477
|
* Retrieve the list of all available commands. Commands starting an underscore are
|
|
@@ -2480,7 +2480,7 @@ export module '@theia/plugin' {
|
|
|
2480
2480
|
* @param filterInternal Set `true` to not see internal commands (starting with an underscore)
|
|
2481
2481
|
* @return Thenable that resolves to a list of command ids.
|
|
2482
2482
|
*/
|
|
2483
|
-
export function getCommands(filterInternal?: boolean):
|
|
2483
|
+
export function getCommands(filterInternal?: boolean): Thenable<string[]>;
|
|
2484
2484
|
}
|
|
2485
2485
|
|
|
2486
2486
|
/**
|
|
@@ -2862,7 +2862,7 @@ export module '@theia/plugin' {
|
|
|
2862
2862
|
/**
|
|
2863
2863
|
* Terminal id.
|
|
2864
2864
|
*/
|
|
2865
|
-
readonly processId:
|
|
2865
|
+
readonly processId: Thenable<number>;
|
|
2866
2866
|
|
|
2867
2867
|
/**
|
|
2868
2868
|
* The exit status of the terminal, this will be undefined while the terminal is active.
|
|
@@ -3481,7 +3481,7 @@ export module '@theia/plugin' {
|
|
|
3481
3481
|
* @param key A string.
|
|
3482
3482
|
* @param value A value. MUST not contain cyclic references.
|
|
3483
3483
|
*/
|
|
3484
|
-
update(key: string, value: any):
|
|
3484
|
+
update(key: string, value: any): Thenable<void>;
|
|
3485
3485
|
}
|
|
3486
3486
|
|
|
3487
3487
|
/**
|
|
@@ -3612,7 +3612,7 @@ export module '@theia/plugin' {
|
|
|
3612
3612
|
*
|
|
3613
3613
|
* @param message Body of the message.
|
|
3614
3614
|
*/
|
|
3615
|
-
postMessage(message: any):
|
|
3615
|
+
postMessage(message: any): Thenable<boolean>;
|
|
3616
3616
|
|
|
3617
3617
|
/**
|
|
3618
3618
|
* Convert a uri for the local file system to one that can be used inside webviews.
|
|
@@ -3847,9 +3847,9 @@ export module '@theia/plugin' {
|
|
|
3847
3847
|
* serializer must restore the webview's `.html` and hook up all webview events.
|
|
3848
3848
|
* @param state Persisted state from the webview content.
|
|
3849
3849
|
*
|
|
3850
|
-
* @return
|
|
3850
|
+
* @return Thenable indicating that the webview has been fully restored.
|
|
3851
3851
|
*/
|
|
3852
|
-
deserializeWebviewPanel(webviewPanel: WebviewPanel, state: T):
|
|
3852
|
+
deserializeWebviewPanel(webviewPanel: WebviewPanel, state: T): Thenable<void>;
|
|
3853
3853
|
}
|
|
3854
3854
|
|
|
3855
3855
|
/**
|
|
@@ -3861,13 +3861,13 @@ export module '@theia/plugin' {
|
|
|
3861
3861
|
* Read the current clipboard contents as text.
|
|
3862
3862
|
* @returns A thenable that resolves to a string.
|
|
3863
3863
|
*/
|
|
3864
|
-
readText():
|
|
3864
|
+
readText(): Thenable<string>;
|
|
3865
3865
|
|
|
3866
3866
|
/**
|
|
3867
3867
|
* Writes text into the clipboard.
|
|
3868
3868
|
* @returns A thenable that resolves when writing happened.
|
|
3869
3869
|
*/
|
|
3870
|
-
writeText(value: string):
|
|
3870
|
+
writeText(value: string): Thenable<void>;
|
|
3871
3871
|
}
|
|
3872
3872
|
|
|
3873
3873
|
/**
|
|
@@ -4415,7 +4415,7 @@ export module '@theia/plugin' {
|
|
|
4415
4415
|
* @param preserveFocus When `true` the editor will not take focus.
|
|
4416
4416
|
* @return A promise that resolves to an [editor](#TextEditor).
|
|
4417
4417
|
*/
|
|
4418
|
-
export function showTextDocument(document: TextDocument, column?: ViewColumn, preserveFocus?: boolean):
|
|
4418
|
+
export function showTextDocument(document: TextDocument, column?: ViewColumn, preserveFocus?: boolean): Thenable<TextEditor>;
|
|
4419
4419
|
|
|
4420
4420
|
/**
|
|
4421
4421
|
* Show the given document in a text editor. [Options](#TextDocumentShowOptions) can be provided
|
|
@@ -4425,7 +4425,7 @@ export module '@theia/plugin' {
|
|
|
4425
4425
|
* @param options [Editor options](#TextDocumentShowOptions) to configure the behavior of showing the [editor](#TextEditor).
|
|
4426
4426
|
* @return A promise that resolves to an [editor](#TextEditor).
|
|
4427
4427
|
*/
|
|
4428
|
-
export function showTextDocument(document: TextDocument, options?: TextDocumentShowOptions):
|
|
4428
|
+
export function showTextDocument(document: TextDocument, options?: TextDocumentShowOptions): Thenable<TextEditor>;
|
|
4429
4429
|
|
|
4430
4430
|
/**
|
|
4431
4431
|
* A short-hand for `openTextDocument(uri).then(document => showTextDocument(document, options))`.
|
|
@@ -4436,7 +4436,7 @@ export module '@theia/plugin' {
|
|
|
4436
4436
|
* @param options [Editor options](#TextDocumentShowOptions) to configure the behavior of showing the [editor](#TextEditor).
|
|
4437
4437
|
* @return A promise that resolves to an [editor](#TextEditor).
|
|
4438
4438
|
*/
|
|
4439
|
-
export function showTextDocument(uri: Uri, options?: TextDocumentShowOptions):
|
|
4439
|
+
export function showTextDocument(uri: Uri, options?: TextDocumentShowOptions): Thenable<TextEditor>;
|
|
4440
4440
|
|
|
4441
4441
|
/**
|
|
4442
4442
|
* Shows a selection list.
|
|
@@ -4446,7 +4446,7 @@ export module '@theia/plugin' {
|
|
|
4446
4446
|
* @param token A token that can be used to signal cancellation.
|
|
4447
4447
|
* @return A promise that resolves to the selection or `undefined`.
|
|
4448
4448
|
*/
|
|
4449
|
-
export function showQuickPick(readonly items: string[] |
|
|
4449
|
+
export function showQuickPick(readonly items: string[] | Thenable<readonly string[]>, options: QuickPickOptions, token?: CancellationToken): Thenable<string | undefined>;
|
|
4450
4450
|
|
|
4451
4451
|
/**
|
|
4452
4452
|
* Shows a selection list allowing multiple selections.
|
|
@@ -4456,7 +4456,7 @@ export module '@theia/plugin' {
|
|
|
4456
4456
|
* @param token A token that can be used to signal cancellation.
|
|
4457
4457
|
* @return A promise that resolves to the selected items or `undefined`.
|
|
4458
4458
|
*/
|
|
4459
|
-
export function showQuickPick(readonly items: string[] |
|
|
4459
|
+
export function showQuickPick(readonly items: string[] | Thenable<readonly string[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable<string[] | undefined>;
|
|
4460
4460
|
|
|
4461
4461
|
/**
|
|
4462
4462
|
* Shows a selection list.
|
|
@@ -4466,7 +4466,7 @@ export module '@theia/plugin' {
|
|
|
4466
4466
|
* @param token A token that can be used to signal cancellation.
|
|
4467
4467
|
* @return A promise that resolves to the selected item or `undefined`.
|
|
4468
4468
|
*/
|
|
4469
|
-
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] |
|
|
4469
|
+
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options: QuickPickOptions, token?: CancellationToken): Thenable<T | undefined>;
|
|
4470
4470
|
|
|
4471
4471
|
/**
|
|
4472
4472
|
* Shows a selection list allowing multiple selections.
|
|
@@ -4476,7 +4476,7 @@ export module '@theia/plugin' {
|
|
|
4476
4476
|
* @param token A token that can be used to signal cancellation.
|
|
4477
4477
|
* @return A promise that resolves to the selected items or `undefined`.
|
|
4478
4478
|
*/
|
|
4479
|
-
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] |
|
|
4479
|
+
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable<T[] | undefined>;
|
|
4480
4480
|
|
|
4481
4481
|
/**
|
|
4482
4482
|
* Creates a [QuickPick](#QuickPick) to let the user pick an item from a list
|
|
@@ -4497,7 +4497,7 @@ export module '@theia/plugin' {
|
|
|
4497
4497
|
* @param options Configures the behavior of the workspace folder list.
|
|
4498
4498
|
* @return A promise that resolves to the workspace folder or `undefined`.
|
|
4499
4499
|
*/
|
|
4500
|
-
export function showWorkspaceFolderPick(options?: WorkspaceFolderPickOptions):
|
|
4500
|
+
export function showWorkspaceFolderPick(options?: WorkspaceFolderPickOptions): Thenable<WorkspaceFolder | undefined>;
|
|
4501
4501
|
|
|
4502
4502
|
/**
|
|
4503
4503
|
* Show an information message.
|
|
@@ -4506,7 +4506,7 @@ export module '@theia/plugin' {
|
|
|
4506
4506
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4507
4507
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4508
4508
|
*/
|
|
4509
|
-
export function showInformationMessage(message: string, ...items: string[]):
|
|
4509
|
+
export function showInformationMessage(message: string, ...items: string[]): Thenable<string | undefined>;
|
|
4510
4510
|
|
|
4511
4511
|
/**
|
|
4512
4512
|
* Show an information message.
|
|
@@ -4516,7 +4516,7 @@ export module '@theia/plugin' {
|
|
|
4516
4516
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4517
4517
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4518
4518
|
*/
|
|
4519
|
-
export function showInformationMessage(message: string, options: MessageOptions, ...items: string[]):
|
|
4519
|
+
export function showInformationMessage(message: string, options: MessageOptions, ...items: string[]): Thenable<string | undefined>;
|
|
4520
4520
|
|
|
4521
4521
|
/**
|
|
4522
4522
|
* Show an information message.
|
|
@@ -4525,7 +4525,7 @@ export module '@theia/plugin' {
|
|
|
4525
4525
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4526
4526
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4527
4527
|
*/
|
|
4528
|
-
export function showInformationMessage<T extends MessageItem>(message: string, ...items: T[]):
|
|
4528
|
+
export function showInformationMessage<T extends MessageItem>(message: string, ...items: T[]): Thenable<T | undefined>;
|
|
4529
4529
|
|
|
4530
4530
|
/**
|
|
4531
4531
|
* Show an information message.
|
|
@@ -4535,7 +4535,7 @@ export module '@theia/plugin' {
|
|
|
4535
4535
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4536
4536
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4537
4537
|
*/
|
|
4538
|
-
export function showInformationMessage<T extends MessageItem>(message: string, options: MessageOptions, ...items: T[]):
|
|
4538
|
+
export function showInformationMessage<T extends MessageItem>(message: string, options: MessageOptions, ...items: T[]): Thenable<T | undefined>;
|
|
4539
4539
|
|
|
4540
4540
|
/**
|
|
4541
4541
|
* Show a warning message.
|
|
@@ -4544,7 +4544,7 @@ export module '@theia/plugin' {
|
|
|
4544
4544
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4545
4545
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4546
4546
|
*/
|
|
4547
|
-
export function showWarningMessage(message: string, ...items: string[]):
|
|
4547
|
+
export function showWarningMessage(message: string, ...items: string[]): Thenable<string | undefined>;
|
|
4548
4548
|
|
|
4549
4549
|
/**
|
|
4550
4550
|
* Show a warning message.
|
|
@@ -4554,7 +4554,7 @@ export module '@theia/plugin' {
|
|
|
4554
4554
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4555
4555
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4556
4556
|
*/
|
|
4557
|
-
export function showWarningMessage(message: string, options: MessageOptions, ...items: string[]):
|
|
4557
|
+
export function showWarningMessage(message: string, options: MessageOptions, ...items: string[]): Thenable<string | undefined>;
|
|
4558
4558
|
|
|
4559
4559
|
/**
|
|
4560
4560
|
* Show a warning message.
|
|
@@ -4563,7 +4563,7 @@ export module '@theia/plugin' {
|
|
|
4563
4563
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4564
4564
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4565
4565
|
*/
|
|
4566
|
-
export function showWarningMessage<T extends MessageItem>(message: string, ...items: T[]):
|
|
4566
|
+
export function showWarningMessage<T extends MessageItem>(message: string, ...items: T[]): Thenable<T | undefined>;
|
|
4567
4567
|
|
|
4568
4568
|
/**
|
|
4569
4569
|
* Show a warning message.
|
|
@@ -4573,7 +4573,7 @@ export module '@theia/plugin' {
|
|
|
4573
4573
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4574
4574
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4575
4575
|
*/
|
|
4576
|
-
export function showWarningMessage<T extends MessageItem>(message: string, options: MessageOptions, ...items: T[]):
|
|
4576
|
+
export function showWarningMessage<T extends MessageItem>(message: string, options: MessageOptions, ...items: T[]): Thenable<T | undefined>;
|
|
4577
4577
|
|
|
4578
4578
|
/**
|
|
4579
4579
|
* Show an error message.
|
|
@@ -4582,7 +4582,7 @@ export module '@theia/plugin' {
|
|
|
4582
4582
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4583
4583
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4584
4584
|
*/
|
|
4585
|
-
export function showErrorMessage(message: string, ...items: string[]):
|
|
4585
|
+
export function showErrorMessage(message: string, ...items: string[]): Thenable<string | undefined>;
|
|
4586
4586
|
|
|
4587
4587
|
/**
|
|
4588
4588
|
* Show an error message.
|
|
@@ -4592,7 +4592,7 @@ export module '@theia/plugin' {
|
|
|
4592
4592
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4593
4593
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4594
4594
|
*/
|
|
4595
|
-
export function showErrorMessage(message: string, options: MessageOptions, ...items: string[]):
|
|
4595
|
+
export function showErrorMessage(message: string, options: MessageOptions, ...items: string[]): Thenable<string | undefined>;
|
|
4596
4596
|
|
|
4597
4597
|
/**
|
|
4598
4598
|
* Show an error message.
|
|
@@ -4601,7 +4601,7 @@ export module '@theia/plugin' {
|
|
|
4601
4601
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4602
4602
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4603
4603
|
*/
|
|
4604
|
-
export function showErrorMessage<T extends MessageItem>(message: string, ...items: T[]):
|
|
4604
|
+
export function showErrorMessage<T extends MessageItem>(message: string, ...items: T[]): Thenable<T | undefined>;
|
|
4605
4605
|
|
|
4606
4606
|
/**
|
|
4607
4607
|
* Show an error message.
|
|
@@ -4611,7 +4611,7 @@ export module '@theia/plugin' {
|
|
|
4611
4611
|
* @param items A set of items that will be rendered as actions in the message.
|
|
4612
4612
|
* @return A promise that resolves to the selected item or `undefined` when being dismissed.
|
|
4613
4613
|
*/
|
|
4614
|
-
export function showErrorMessage<T extends MessageItem>(message: string, options: MessageOptions, ...items: T[]):
|
|
4614
|
+
export function showErrorMessage<T extends MessageItem>(message: string, options: MessageOptions, ...items: T[]): Thenable<T | undefined>;
|
|
4615
4615
|
|
|
4616
4616
|
/**
|
|
4617
4617
|
* Opens an input box to ask the user for input.
|
|
@@ -4624,7 +4624,7 @@ export module '@theia/plugin' {
|
|
|
4624
4624
|
* @param token A token that can be used to signal cancellation.
|
|
4625
4625
|
* @return A promise that resolves to a string the user provided or to `undefined` in case of dismissal.
|
|
4626
4626
|
*/
|
|
4627
|
-
export function showInputBox(options?: InputBoxOptions, token?: CancellationToken):
|
|
4627
|
+
export function showInputBox(options?: InputBoxOptions, token?: CancellationToken): Thenable<string | undefined>;
|
|
4628
4628
|
|
|
4629
4629
|
/**
|
|
4630
4630
|
* Shows a file open dialog to the user which allows to select a file
|
|
@@ -4633,7 +4633,7 @@ export module '@theia/plugin' {
|
|
|
4633
4633
|
* @param options Options that control the dialog.
|
|
4634
4634
|
* @returns A promise that resolves to the selected resources or `undefined`.
|
|
4635
4635
|
*/
|
|
4636
|
-
export function showOpenDialog(options: OpenDialogOptions):
|
|
4636
|
+
export function showOpenDialog(options: OpenDialogOptions): Thenable<Uri[] | undefined>;
|
|
4637
4637
|
|
|
4638
4638
|
/**
|
|
4639
4639
|
* Shows a file save dialog to the user which allows to select a file
|
|
@@ -4642,7 +4642,7 @@ export module '@theia/plugin' {
|
|
|
4642
4642
|
* @param options Options that control the dialog.
|
|
4643
4643
|
* @returns A promise that resolves to the selected resource or `undefined`.
|
|
4644
4644
|
*/
|
|
4645
|
-
export function showSaveDialog(options: SaveDialogOptions):
|
|
4645
|
+
export function showSaveDialog(options: SaveDialogOptions): Thenable<Uri | undefined>;
|
|
4646
4646
|
|
|
4647
4647
|
/**
|
|
4648
4648
|
* Shows a file upload dialog to the user which allows to upload files
|
|
@@ -4651,7 +4651,7 @@ export module '@theia/plugin' {
|
|
|
4651
4651
|
* @param options Options, that control the dialog.
|
|
4652
4652
|
* @returns A promise that resolves the paths of uploaded files or `undefined`.
|
|
4653
4653
|
*/
|
|
4654
|
-
export function showUploadDialog(options: UploadDialogOptions):
|
|
4654
|
+
export function showUploadDialog(options: UploadDialogOptions): Thenable<Uri[] | undefined>;
|
|
4655
4655
|
|
|
4656
4656
|
/**
|
|
4657
4657
|
* Create and show a new webview panel.
|
|
@@ -4784,10 +4784,10 @@ export module '@theia/plugin' {
|
|
|
4784
4784
|
* Set a message to the status bar.
|
|
4785
4785
|
*
|
|
4786
4786
|
* @param text The message to show, supports icon substitution as in status bar.
|
|
4787
|
-
* @param hideWhenDone
|
|
4787
|
+
* @param hideWhenDone Thenable on which completion (resolve or reject) the message will be disposed.
|
|
4788
4788
|
* @return A disposable which hides the status bar message.
|
|
4789
4789
|
*/
|
|
4790
|
-
export function setStatusBarMessage(text: string, hideWhenDone:
|
|
4790
|
+
export function setStatusBarMessage(text: string, hideWhenDone: Thenable<any>): Disposable;
|
|
4791
4791
|
|
|
4792
4792
|
/**
|
|
4793
4793
|
* Creates a status bar {@link StatusBarItem item}.
|
|
@@ -4917,7 +4917,7 @@ export module '@theia/plugin' {
|
|
|
4917
4917
|
*
|
|
4918
4918
|
* @return The thenable the task-callback returned.
|
|
4919
4919
|
*/
|
|
4920
|
-
export function withProgress<R>(options: ProgressOptions, task: (progress: Progress<{ message?: string; increment?: number }>, token: CancellationToken) =>
|
|
4920
|
+
export function withProgress<R>(options: ProgressOptions, task: (progress: Progress<{ message?: string; increment?: number }>, token: CancellationToken) => Thenable<R>): Thenable<R>;
|
|
4921
4921
|
|
|
4922
4922
|
/**
|
|
4923
4923
|
* Creates a [InputBox](#InputBox) to let the user enter some text input.
|
|
@@ -5319,7 +5319,7 @@ export module '@theia/plugin' {
|
|
|
5319
5319
|
*
|
|
5320
5320
|
* **NOTE:** [TreeDataProvider](#TreeDataProvider) is required to implement [getParent](#TreeDataProvider.getParent) method to access this API.
|
|
5321
5321
|
*/
|
|
5322
|
-
reveal(element: T, options?: { select?: boolean, focus?: boolean, expand?: boolean | number }):
|
|
5322
|
+
reveal(element: T, options?: { select?: boolean, focus?: boolean, expand?: boolean | number }): Thenable<void>;
|
|
5323
5323
|
}
|
|
5324
5324
|
|
|
5325
5325
|
/**
|
|
@@ -5339,7 +5339,7 @@ export module '@theia/plugin' {
|
|
|
5339
5339
|
* @param element The element for which [TreeItem](#TreeItem) representation is asked for.
|
|
5340
5340
|
* @return [TreeItem](#TreeItem) representation of the element
|
|
5341
5341
|
*/
|
|
5342
|
-
getTreeItem(element: T): TreeItem |
|
|
5342
|
+
getTreeItem(element: T): TreeItem | Thenable<TreeItem>;
|
|
5343
5343
|
|
|
5344
5344
|
/**
|
|
5345
5345
|
* Get the children of `element` or root if no element is passed.
|
|
@@ -5593,7 +5593,7 @@ export module '@theia/plugin' {
|
|
|
5593
5593
|
* `ConfigurationTarget.WorkspaceFolder` when configuration is resource specific
|
|
5594
5594
|
* `ConfigurationTarget.Workspace` otherwise.
|
|
5595
5595
|
*/
|
|
5596
|
-
update(section: string, value: any, configurationTarget?: ConfigurationTarget | boolean):
|
|
5596
|
+
update(section: string, value: any, configurationTarget?: ConfigurationTarget | boolean): Thenable<void>;
|
|
5597
5597
|
|
|
5598
5598
|
/**
|
|
5599
5599
|
* Readable dictionary that backs this configuration.
|
|
@@ -6260,7 +6260,7 @@ export module '@theia/plugin' {
|
|
|
6260
6260
|
* @param uri Identifies the resource to open.
|
|
6261
6261
|
* @return A promise that resolves to a [document](#TextDocument).
|
|
6262
6262
|
*/
|
|
6263
|
-
export function openTextDocument(uri: Uri):
|
|
6263
|
+
export function openTextDocument(uri: Uri): Thenable<TextDocument | undefined>;
|
|
6264
6264
|
|
|
6265
6265
|
/**
|
|
6266
6266
|
* A short-hand for `openTextDocument(Uri.file(fileName))`.
|
|
@@ -6269,7 +6269,7 @@ export module '@theia/plugin' {
|
|
|
6269
6269
|
* @param fileName A name of a file on disk.
|
|
6270
6270
|
* @return A promise that resolves to a [document](#TextDocument).
|
|
6271
6271
|
*/
|
|
6272
|
-
export function openTextDocument(fileName: string):
|
|
6272
|
+
export function openTextDocument(fileName: string): Thenable<TextDocument | undefined>;
|
|
6273
6273
|
|
|
6274
6274
|
/**
|
|
6275
6275
|
* Opens an untitled text document. The editor will prompt the user for a file
|
|
@@ -6279,7 +6279,7 @@ export module '@theia/plugin' {
|
|
|
6279
6279
|
* @param options Options to control how the document will be created.
|
|
6280
6280
|
* @return A promise that resolves to a [document](#TextDocument).
|
|
6281
6281
|
*/
|
|
6282
|
-
export function openTextDocument(options?: { language?: string; content?: string; }):
|
|
6282
|
+
export function openTextDocument(options?: { language?: string; content?: string; }): Thenable<TextDocument | undefined>;
|
|
6283
6283
|
|
|
6284
6284
|
/**
|
|
6285
6285
|
* Get a workspace configuration object.
|
|
@@ -6338,7 +6338,7 @@ export module '@theia/plugin' {
|
|
|
6338
6338
|
* @return A thenable that resolves to an array of resource identifiers. Will return no results if no
|
|
6339
6339
|
* [workspace folders](#workspace.workspaceFolders) are opened.
|
|
6340
6340
|
*/
|
|
6341
|
-
export function findFiles(include: GlobPattern, exclude?: GlobPattern | null, maxResults?: number, token?: CancellationToken):
|
|
6341
|
+
export function findFiles(include: GlobPattern, exclude?: GlobPattern | null, maxResults?: number, token?: CancellationToken): Thenable<Uri[]>;
|
|
6342
6342
|
|
|
6343
6343
|
/**
|
|
6344
6344
|
* Find text in files across all [workspace folders] in the workspace
|
|
@@ -6356,7 +6356,7 @@ export module '@theia/plugin' {
|
|
|
6356
6356
|
* @param includeUntitled Also save files that have been created during this session.
|
|
6357
6357
|
* @return A thenable that resolves when the files have been saved.
|
|
6358
6358
|
*/
|
|
6359
|
-
export function saveAll(includeUntitled?: boolean):
|
|
6359
|
+
export function saveAll(includeUntitled?: boolean): Thenable<boolean>;
|
|
6360
6360
|
|
|
6361
6361
|
/**
|
|
6362
6362
|
* Make changes to one or many resources or create, delete, and rename resources as defined by the given
|
|
@@ -6374,7 +6374,7 @@ export module '@theia/plugin' {
|
|
|
6374
6374
|
* @param edit A workspace edit.
|
|
6375
6375
|
* @return A thenable that resolves when the edit could be applied.
|
|
6376
6376
|
*/
|
|
6377
|
-
export function applyEdit(edit: WorkspaceEdit):
|
|
6377
|
+
export function applyEdit(edit: WorkspaceEdit): Thenable<boolean>;
|
|
6378
6378
|
|
|
6379
6379
|
/**
|
|
6380
6380
|
* Register a filesystem provider for a given scheme, e.g. `ftp`.
|
|
@@ -6496,7 +6496,7 @@ export module '@theia/plugin' {
|
|
|
6496
6496
|
* @param envVarName name of environment variable to get
|
|
6497
6497
|
* @returns value of the given environment variable name or undefined if there is no such variable.
|
|
6498
6498
|
*/
|
|
6499
|
-
export function getEnvVariable(envVarName: string):
|
|
6499
|
+
export function getEnvVariable(envVarName: string): Thenable<string | undefined>;
|
|
6500
6500
|
|
|
6501
6501
|
/**
|
|
6502
6502
|
* Gets query parameter value by name.
|
|
@@ -6569,7 +6569,7 @@ export module '@theia/plugin' {
|
|
|
6569
6569
|
* @param target The uri that should be opened.
|
|
6570
6570
|
* @returns A promise indicating if open was successful.
|
|
6571
6571
|
*/
|
|
6572
|
-
export function openExternal(target: Uri):
|
|
6572
|
+
export function openExternal(target: Uri): Thenable<boolean>;
|
|
6573
6573
|
|
|
6574
6574
|
/**
|
|
6575
6575
|
* Resolves an *external* uri, such as a `http:` or `https:` link, from where the extension is running to a
|
|
@@ -6591,7 +6591,7 @@ export module '@theia/plugin' {
|
|
|
6591
6591
|
*
|
|
6592
6592
|
* @return A uri that can be used on the client machine.
|
|
6593
6593
|
*/
|
|
6594
|
-
export function asExternalUri(target: Uri):
|
|
6594
|
+
export function asExternalUri(target: Uri): Thenable<Uri>;
|
|
6595
6595
|
|
|
6596
6596
|
}
|
|
6597
6597
|
|
|
@@ -9018,7 +9018,7 @@ export module '@theia/plugin' {
|
|
|
9018
9018
|
* Return the identifiers of all known languages.
|
|
9019
9019
|
* @return Promise resolving to an array of identifier strings.
|
|
9020
9020
|
*/
|
|
9021
|
-
export function getLanguages():
|
|
9021
|
+
export function getLanguages(): Thenable<string[]>;
|
|
9022
9022
|
|
|
9023
9023
|
/**
|
|
9024
9024
|
* Set (and change) the [language](#TextDocument.languageId) that is associated
|
|
@@ -9031,7 +9031,7 @@ export module '@theia/plugin' {
|
|
|
9031
9031
|
* @param languageId The new language identifier.
|
|
9032
9032
|
* @returns A thenable that resolves with the updated document.
|
|
9033
9033
|
*/
|
|
9034
|
-
export function setTextDocumentLanguage(document: TextDocument, languageId: string):
|
|
9034
|
+
export function setTextDocumentLanguage(document: TextDocument, languageId: string): Thenable<TextDocument>;
|
|
9035
9035
|
|
|
9036
9036
|
/**
|
|
9037
9037
|
* Compute the match between a document [selector](#DocumentSelector) and a document. Values
|
|
@@ -9902,7 +9902,7 @@ export module '@theia/plugin' {
|
|
|
9902
9902
|
/**
|
|
9903
9903
|
* Send a custom request to the debug adapter.
|
|
9904
9904
|
*/
|
|
9905
|
-
customRequest(command: string, args?: any):
|
|
9905
|
+
customRequest(command: string, args?: any): Thenable<any>;
|
|
9906
9906
|
}
|
|
9907
9907
|
|
|
9908
9908
|
/**
|
|
@@ -10415,13 +10415,13 @@ export module '@theia/plugin' {
|
|
|
10415
10415
|
* @param parentSessionOrOptions Debug session options. When passed a parent debug session, assumes options with just this parent session.
|
|
10416
10416
|
* @return A thenable that resolves when debugging could be successfully started.
|
|
10417
10417
|
*/
|
|
10418
|
-
export function startDebugging(folder: WorkspaceFolder | undefined, nameOrConfiguration: string | DebugConfiguration, parentSessionOrOptions?: DebugSession | DebugSessionOptions):
|
|
10418
|
+
export function startDebugging(folder: WorkspaceFolder | undefined, nameOrConfiguration: string | DebugConfiguration, parentSessionOrOptions?: DebugSession | DebugSessionOptions): Thenable<boolean>;
|
|
10419
10419
|
|
|
10420
10420
|
/**
|
|
10421
10421
|
* Stop the given debug session or stop all debug sessions if session is omitted.
|
|
10422
10422
|
* @param session The [debug session](#DebugSession) to stop; if omitted all sessions are stopped.
|
|
10423
10423
|
*/
|
|
10424
|
-
export function stopDebugging(session?: DebugSession):
|
|
10424
|
+
export function stopDebugging(session?: DebugSession): Thenable<void>;
|
|
10425
10425
|
|
|
10426
10426
|
/**
|
|
10427
10427
|
* Add breakpoints.
|
|
@@ -10992,7 +10992,7 @@ export module '@theia/plugin' {
|
|
|
10992
10992
|
*
|
|
10993
10993
|
* @param filter a filter to filter the return tasks.
|
|
10994
10994
|
*/
|
|
10995
|
-
export function fetchTasks(filter?: TaskFilter):
|
|
10995
|
+
export function fetchTasks(filter?: TaskFilter): Thenable<Task[]>;
|
|
10996
10996
|
|
|
10997
10997
|
/**
|
|
10998
10998
|
* Executes a task that is managed by VS Code. The returned
|
|
@@ -11000,7 +11000,7 @@ export module '@theia/plugin' {
|
|
|
11000
11000
|
*
|
|
11001
11001
|
* @param task the task to execute
|
|
11002
11002
|
*/
|
|
11003
|
-
export function executeTask(task: Task):
|
|
11003
|
+
export function executeTask(task: Task): Thenable<TaskExecution>;
|
|
11004
11004
|
|
|
11005
11005
|
/**
|
|
11006
11006
|
* The currently active task executions or an empty array.
|
|
@@ -11058,7 +11058,7 @@ export module '@theia/plugin' {
|
|
|
11058
11058
|
* @param key A string.
|
|
11059
11059
|
* @param value A value. MUST not contain cyclic references.
|
|
11060
11060
|
*/
|
|
11061
|
-
update(key: string, value: any):
|
|
11061
|
+
update(key: string, value: any): Thenable<void>;
|
|
11062
11062
|
}
|
|
11063
11063
|
|
|
11064
11064
|
/* The workspace symbol provider interface defines the contract between extensions
|
|
@@ -11893,3 +11893,21 @@ export module '@theia/plugin' {
|
|
|
11893
11893
|
|
|
11894
11894
|
}
|
|
11895
11895
|
}
|
|
11896
|
+
|
|
11897
|
+
/**
|
|
11898
|
+
* Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
|
|
11899
|
+
* and others. This API makes no assumption about what promise library is being used which
|
|
11900
|
+
* enables reusing existing code without migrating to a specific promise implementation. Still,
|
|
11901
|
+
* we recommend the use of native promises which are available in this editor.
|
|
11902
|
+
*/
|
|
11903
|
+
interface Thenable<T> {
|
|
11904
|
+
/**
|
|
11905
|
+
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
|
11906
|
+
* @param onfulfilled The callback to execute when the Promise is resolved.
|
|
11907
|
+
* @param onrejected The callback to execute when the Promise is rejected.
|
|
11908
|
+
* @returns A Promise for the completion of which ever callback is executed.
|
|
11909
|
+
*/
|
|
11910
|
+
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
|
|
11911
|
+
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
|
|
11912
|
+
}
|
|
11913
|
+
|