@theia/plugin 1.25.0-next.2 → 1.25.0-next.5

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 +2 -2
  2. package/src/theia.d.ts +19 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.25.0-next.2+ce495c5fb38",
3
+ "version": "1.25.0-next.5+b8fd6663938",
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": "ce495c5fb3845dd48ccb525e43fdf24a34d04a16"
35
+ "gitHead": "b8fd666393866d1bd907a8035435aa74ecb7d506"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -496,6 +496,17 @@ export module '@theia/plugin' {
496
496
  */
497
497
  appendPlaceholder(value: string | ((snippet: SnippetString) => any), number?: number): SnippetString;
498
498
 
499
+ /**
500
+ * Builder-function that appends a choice (`${1|a,b,c|}`) to
501
+ * the {@linkcode SnippetString.value value} of this snippet string.
502
+ *
503
+ * @param values The values for choices - the array of strings
504
+ * @param number The number of this tabstop, defaults to an auto-increment
505
+ * value starting at 1.
506
+ * @return This snippet string.
507
+ */
508
+ appendChoice(values: string[], number?: number): SnippetString;
509
+
499
510
  /**
500
511
  * Builder-function that appends a variable (`${VAR}`) to
501
512
  * the [`value`](#SnippetString.value) of this snippet string.
@@ -2180,6 +2191,11 @@ export module '@theia/plugin' {
2180
2191
  */
2181
2192
  matchOnDetail: boolean;
2182
2193
 
2194
+ /*
2195
+ * An optional flag to maintain the scroll position of the quick pick when the quick pick items are updated. Defaults to false.
2196
+ */
2197
+ keepScrollPosition?: boolean;
2198
+
2183
2199
  /**
2184
2200
  * Active items. This can be read and updated by the extension.
2185
2201
  */
@@ -7909,7 +7925,7 @@ export module '@theia/plugin' {
7909
7925
  *
7910
7926
  * A code action can be any command that is [known](#commands.getCommands) to the system.
7911
7927
  */
7912
- export interface CodeActionProvider {
7928
+ export interface CodeActionProvider<T extends CodeAction = CodeAction> {
7913
7929
  /**
7914
7930
  * Provide commands for the given document and range.
7915
7931
  *
@@ -7921,12 +7937,7 @@ export module '@theia/plugin' {
7921
7937
  * @return An array of commands, quick fixes, or refactorings or a thenable of such. The lack of a result can be
7922
7938
  * signaled by returning `undefined`, `null`, or an empty array.
7923
7939
  */
7924
- provideCodeActions(
7925
- document: TextDocument,
7926
- range: Range | Selection,
7927
- context: CodeActionContext,
7928
- token: CancellationToken | undefined
7929
- ): ProviderResult<(Command | CodeAction)[]>;
7940
+ provideCodeActions(document: TextDocument, range: Range | Selection, context: CodeActionContext, token: CancellationToken | undefined): ProviderResult<(Command | T)[]>;
7930
7941
 
7931
7942
  /**
7932
7943
  * Given a code action fill in its `edit`-property. Changes to
@@ -7942,7 +7953,7 @@ export module '@theia/plugin' {
7942
7953
  * @return The resolved code action or a thenable that resolves to such. It is OK to return the given
7943
7954
  * `item`. When no result is returned, the given `item` will be used.
7944
7955
  */
7945
- resolveCodeAction?(codeAction: CodeAction, token: CancellationToken | undefined): ProviderResult<CodeAction>;
7956
+ resolveCodeAction?(codeAction: T, token: CancellationToken | undefined): ProviderResult<T>;
7946
7957
  }
7947
7958
 
7948
7959
  /**