@theia/plugin 1.56.0 → 1.57.0-next.22

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 (3) hide show
  1. package/README.md +18 -8
  2. package/package.json +2 -2
  3. package/src/theia.d.ts +25 -46
package/README.md CHANGED
@@ -192,6 +192,7 @@ Simple example that show a status bar message with statusBarItem:
192
192
  item.text = 'test status bar item';
193
193
  item.show();
194
194
  ```
195
+
195
196
  #### Output channel API
196
197
 
197
198
  It is possible to show a container for readonly textual information:
@@ -241,9 +242,10 @@ const terminal = theia.window.createTerminal("Bash terminal", "/bin/bash", ["-l"
241
242
  ```
242
243
 
243
244
  Where are:
244
- - first argument - terminal's name.
245
- - second argument - path to the executable shell.
246
- - third argument - arguments to configure executable shell.
245
+
246
+ - first argument - terminal's name.
247
+ - second argument - path to the executable shell.
248
+ - third argument - arguments to configure executable shell.
247
249
 
248
250
  You can create terminal with specific options:
249
251
 
@@ -258,10 +260,11 @@ const options: theia.TerminalOptions {
258
260
  ```
259
261
 
260
262
  Where are:
261
- - "shellPath" - path to the executable shell, for example "/bin/bash", "bash", "sh" or so on.
262
- - "shellArgs" - shell command arguments, for example without login: "-l". If you defined shell command "/bin/bash" and set up shell arguments "-l" than will be created terminal process with command "/bin/bash -l". And client side will connect to stdin/stdout of this process to interaction with user.
263
- - "cwd" - current working directory;
264
- - "env"- environment variables for terminal process, for example TERM - identifier terminal window capabilities.
263
+
264
+ - "shellPath" - path to the executable shell, for example "/bin/bash", "bash", "sh" or so on.
265
+ - "shellArgs" - shell command arguments, for example without login: "-l". If you defined shell command "/bin/bash" and set up shell arguments "-l" than will be created terminal process with command "/bin/bash -l". And client side will connect to stdin/stdout of this process to interaction with user.
266
+ - "cwd" - current working directory;
267
+ - "env"- environment variables for terminal process, for example TERM - identifier terminal window capabilities.
265
268
 
266
269
  Function to create new terminal with defined theia.TerminalOptions described above:
267
270
 
@@ -288,6 +291,7 @@ terminal.sendText("Hello, Theia!", false);
288
291
  ```
289
292
 
290
293
  Where are:
294
+
291
295
  - first argument - text content.
292
296
  - second argument - in case true, terminal will apply new line after the text, otherwise will send only the text.
293
297
 
@@ -323,6 +327,7 @@ terminal.processId.then(id => {
323
327
  Preference API allows one to read or update User's and Workspace's preferences.
324
328
 
325
329
  To get preferences:
330
+
326
331
  ```typescript
327
332
  // editor preferences
328
333
  const preferences = theia.workspace.getConfiguration('editor');
@@ -332,6 +337,7 @@ const fontSize = preferences.get('tabSize');
332
337
  ```
333
338
 
334
339
  To change preference:
340
+
335
341
  ```typescript
336
342
  preferences.onDidChangeConfiguration(e => {
337
343
  if (e.affectsConfiguration('editor.tabSize')) {
@@ -353,6 +359,7 @@ const diagnostics = theia.languages.getDiagnostics(uriToResource)
353
359
  ```
354
360
 
355
361
  To get all diagnostics use:
362
+
356
363
  ```typescript
357
364
  const diagnostics = theia.languages.getDiagnostics()
358
365
  ```
@@ -424,6 +431,7 @@ diagnosticsCollection.forEach((uri, diagnostics) => {
424
431
  #### Signature help
425
432
 
426
433
  To provide signature help form plugin it is required to register provider. For registration 3 items are needed:
434
+
427
435
  - Documents selector to describe for which files it should be applied
428
436
  - Handler which will do the work
429
437
  - Trigger characters after typing of which the handler should be invoked. Often symbols `(` and `,` are used.
@@ -474,6 +482,7 @@ Example of signature information:
474
482
  ```
475
483
 
476
484
  Note, that:
485
+
477
486
  - `activeSignature` and `activeParameter` are zero based.
478
487
  - label is usually full method signature.
479
488
  - for documentation fields markdown partially supported (Tags aren't supported).
@@ -762,5 +771,6 @@ function provideRanges(document: theia.TextDocument): theia.ProviderResult<theia
762
771
  - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
763
772
 
764
773
  ## Trademark
774
+
765
775
  "Theia" is a trademark of the Eclipse Foundation
766
- https://www.eclipse.org/theia
776
+ <https://www.eclipse.org/theia>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.56.0",
3
+ "version": "1.57.0-next.22+35d458a96",
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": "3b4498f8f1c66be688847418fcc35595282671dc"
35
+ "gitHead": "35d458a961212de264d9579305d984147fa55618"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -2163,7 +2163,7 @@ export module '@theia/plugin' {
2163
2163
  /**
2164
2164
  * The icon path or {@link ThemeIcon} for the QuickPickItem.
2165
2165
  */
2166
- iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
2166
+ iconPath?: IconPath;
2167
2167
 
2168
2168
  /**
2169
2169
  * A human-readable string which is rendered less prominent in the same line. Supports rendering of
@@ -2740,6 +2740,21 @@ export module '@theia/plugin' {
2740
2740
  private constructor(id: string, color?: ThemeColor);
2741
2741
  }
2742
2742
 
2743
+ /**
2744
+ * Represents an icon in the UI. This is either an uri, separate uris for the light- and dark-themes,
2745
+ * or a {@link ThemeIcon theme icon}.
2746
+ */
2747
+ export type IconPath = Uri | {
2748
+ /**
2749
+ * The icon path for the light theme.
2750
+ */
2751
+ light: Uri;
2752
+ /**
2753
+ * The icon path for the dark theme.
2754
+ */
2755
+ dark: Uri;
2756
+ } | ThemeIcon;
2757
+
2743
2758
  /**
2744
2759
  * Represents the state of a window.
2745
2760
  */
@@ -3520,7 +3535,7 @@ export module '@theia/plugin' {
3520
3535
  /**
3521
3536
  * The icon path or {@link ThemeIcon} for the terminal.
3522
3537
  */
3523
- iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
3538
+ iconPath?: IconPath;
3524
3539
 
3525
3540
  /**
3526
3541
  * The icon {@link ThemeColor} for the terminal.
@@ -3640,7 +3655,7 @@ export module '@theia/plugin' {
3640
3655
  /**
3641
3656
  * The icon path or {@link ThemeIcon} for the terminal.
3642
3657
  */
3643
- iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
3658
+ iconPath?: IconPath;
3644
3659
 
3645
3660
  /**
3646
3661
  * The icon {@link ThemeColor} for the terminal.
@@ -6227,7 +6242,7 @@ export module '@theia/plugin' {
6227
6242
  /**
6228
6243
  * Icon for the button.
6229
6244
  */
6230
- readonly iconPath: Uri | { light: Uri; dark: Uri } | ThemeIcon;
6245
+ readonly iconPath: IconPath;
6231
6246
 
6232
6247
  /**
6233
6248
  * An optional tooltip.
@@ -6841,7 +6856,7 @@ export module '@theia/plugin' {
6841
6856
  * When `falsy`, {@link ThemeIcon.Folder Folder Theme Icon} is assigned, if item is collapsible otherwise {@link ThemeIcon.File File Theme Icon}.
6842
6857
  * When a {@link ThemeIcon ThemeIcon} is specified, icon is derived from the current file icon theme for the specified theme icon using {@link TreeItem.resourceUri resourceUri} (if provided).
6843
6858
  */
6844
- iconPath?: string | Uri | { light: string | Uri; dark: string | Uri } | ThemeIcon;
6859
+ iconPath?: string | IconPath;
6845
6860
 
6846
6861
  /**
6847
6862
  * A human readable string which is rendered less prominent.
@@ -10612,7 +10627,7 @@ export module '@theia/plugin' {
10612
10627
  /**
10613
10628
  * The icon path or {@link ThemeIcon ThemeIcon} for the edit.
10614
10629
  */
10615
- iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
10630
+ iconPath?: IconPath;
10616
10631
  }
10617
10632
 
10618
10633
  /**
@@ -17473,16 +17488,7 @@ export module '@theia/plugin' {
17473
17488
  /**
17474
17489
  * An icon for the participant shown in UI.
17475
17490
  */
17476
- iconPath?: Uri | {
17477
- /**
17478
- * The icon path for the light theme.
17479
- */
17480
- light: Uri;
17481
- /**
17482
- * The icon path for the dark theme.
17483
- */
17484
- dark: Uri;
17485
- } | ThemeIcon;
17491
+ iconPath?: IconPath;
17486
17492
 
17487
17493
  /**
17488
17494
  * The handler for requests to this participant.
@@ -17652,16 +17658,7 @@ export module '@theia/plugin' {
17652
17658
  * @param value A uri or location
17653
17659
  * @param iconPath Icon for the reference shown in UI
17654
17660
  */
17655
- reference(value: Uri | Location, iconPath?: Uri | ThemeIcon | {
17656
- /**
17657
- * The icon path for the light theme.
17658
- */
17659
- light: Uri;
17660
- /**
17661
- * The icon path for the dark theme.
17662
- */
17663
- dark: Uri;
17664
- }): void;
17661
+ reference(value: Uri | Location, iconPath?: IconPath): void;
17665
17662
 
17666
17663
  /**
17667
17664
  * Pushes a part to this stream.
@@ -17781,32 +17778,14 @@ export module '@theia/plugin' {
17781
17778
  /**
17782
17779
  * The icon for the reference.
17783
17780
  */
17784
- iconPath?: Uri | ThemeIcon | {
17785
- /**
17786
- * The icon path for the light theme.
17787
- */
17788
- light: Uri;
17789
- /**
17790
- * The icon path for the dark theme.
17791
- */
17792
- dark: Uri;
17793
- };
17781
+ iconPath?: IconPath;
17794
17782
 
17795
17783
  /**
17796
17784
  * Create a new ChatResponseReferencePart.
17797
17785
  * @param value A uri or location
17798
17786
  * @param iconPath Icon for the reference shown in UI
17799
17787
  */
17800
- constructor(value: Uri | Location, iconPath?: Uri | ThemeIcon | {
17801
- /**
17802
- * The icon path for the light theme.
17803
- */
17804
- light: Uri;
17805
- /**
17806
- * The icon path for the dark theme.
17807
- */
17808
- dark: Uri;
17809
- });
17788
+ constructor(value: Uri | Location, iconPath?: IconPath);
17810
17789
  }
17811
17790
 
17812
17791
  /**