@theia/plugin 1.37.0-next.21 → 1.37.0-next.29

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.37.0-next.21+2deedbad7",
3
+ "version": "1.37.0-next.29+53b3841a9",
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": "2deedbad70bd4b503bf9c7e733ab9603f492600f"
35
+ "gitHead": "53b3841a910f05937c6f18cbeb61395dd893ded4"
36
36
  }
@@ -168,35 +168,6 @@ export module '@theia/plugin' {
168
168
  color?: ThemeColor;
169
169
  }
170
170
 
171
- // #region LogLevel: https://github.com/microsoft/vscode/issues/85992
172
-
173
- /**
174
- * The severity level of a log message
175
- */
176
- export enum LogLevel {
177
- Trace = 1,
178
- Debug = 2,
179
- Info = 3,
180
- Warning = 4,
181
- Error = 5,
182
- Critical = 6,
183
- Off = 7
184
- }
185
-
186
- export namespace env {
187
- /**
188
- * Current logging level.
189
- */
190
- export const logLevel: LogLevel;
191
-
192
- /**
193
- * An [event](#Event) that fires when the log level has changed.
194
- */
195
- export const onDidChangeLogLevel: Event<LogLevel>;
196
- }
197
-
198
- // #endregion
199
-
200
171
  // #region search in workspace
201
172
  /**
202
173
  * The parameters of a query for text search.
package/src/theia.d.ts CHANGED
@@ -2702,6 +2702,9 @@ export module '@theia/plugin' {
2702
2702
 
2703
2703
  /**
2704
2704
  * An output channel is a container for readonly textual information.
2705
+ *
2706
+ * To get an instance of an `OutputChannel` use
2707
+ * {@link window.createOutputChannel createOutputChannel}.
2705
2708
  */
2706
2709
  export interface OutputChannel {
2707
2710
 
@@ -2765,6 +2768,106 @@ export module '@theia/plugin' {
2765
2768
  dispose(): void;
2766
2769
  }
2767
2770
 
2771
+ /**
2772
+ * Log levels
2773
+ */
2774
+ export enum LogLevel {
2775
+
2776
+ /**
2777
+ * No messages are logged with this level.
2778
+ */
2779
+ Off = 0,
2780
+
2781
+ /**
2782
+ * All messages are logged with this level.
2783
+ */
2784
+ Trace = 1,
2785
+
2786
+ /**
2787
+ * Messages with debug and higher log level are logged with this level.
2788
+ */
2789
+ Debug = 2,
2790
+
2791
+ /**
2792
+ * Messages with info and higher log level are logged with this level.
2793
+ */
2794
+ Info = 3,
2795
+
2796
+ /**
2797
+ * Messages with warning and higher log level are logged with this level.
2798
+ */
2799
+ Warning = 4,
2800
+
2801
+ /**
2802
+ * Only error messages are logged with this level.
2803
+ */
2804
+ Error = 5
2805
+ }
2806
+
2807
+ /**
2808
+ * A channel for containing log output.
2809
+ *
2810
+ * To get an instance of a `LogOutputChannel` use
2811
+ * {@link window.createOutputChannel createOutputChannel}.
2812
+ */
2813
+ export interface LogOutputChannel extends OutputChannel {
2814
+
2815
+ /**
2816
+ * The current log level of the channel. Defaults to {@link env.logLevel editor log level}.
2817
+ */
2818
+ readonly logLevel: LogLevel;
2819
+
2820
+ /**
2821
+ * An {@link Event} which fires when the log level of the channel changes.
2822
+ */
2823
+ readonly onDidChangeLogLevel: Event<LogLevel>;
2824
+
2825
+ /**
2826
+ * Outputs the given trace message to the channel. Use this method to log verbose information.
2827
+ *
2828
+ * The message is only loggeed if the channel is configured to display {@link LogLevel.Trace trace} log level.
2829
+ *
2830
+ * @param message trace message to log
2831
+ */
2832
+ trace(message: string, ...args: any[]): void;
2833
+
2834
+ /**
2835
+ * Outputs the given debug message to the channel.
2836
+ *
2837
+ * The message is only loggeed if the channel is configured to display {@link LogLevel.Debug debug} log level or lower.
2838
+ *
2839
+ * @param message debug message to log
2840
+ */
2841
+ debug(message: string, ...args: any[]): void;
2842
+
2843
+ /**
2844
+ * Outputs the given information message to the channel.
2845
+ *
2846
+ * The message is only loggeed if the channel is configured to display {@link LogLevel.Info info} log level or lower.
2847
+ *
2848
+ * @param message info message to log
2849
+ */
2850
+ info(message: string, ...args: any[]): void;
2851
+
2852
+ /**
2853
+ * Outputs the given warning message to the channel.
2854
+ *
2855
+ * The message is only loggeed if the channel is configured to display {@link LogLevel.Warning warning} log level or lower.
2856
+ *
2857
+ * @param message warning message to log
2858
+ */
2859
+ warn(message: string, ...args: any[]): void;
2860
+
2861
+ /**
2862
+ * Outputs the given error or error message to the channel.
2863
+ *
2864
+ * The message is only loggeed if the channel is configured to display {@link LogLevel.Error error} log level or lower.
2865
+ *
2866
+ * @param error Error or error message to log
2867
+ */
2868
+ error(error: string | Error, ...args: any[]): void;
2869
+ }
2870
+
2768
2871
  /**
2769
2872
  * Options to configure the behaviour of a file open dialog.
2770
2873
  *
@@ -5250,6 +5353,14 @@ export module '@theia/plugin' {
5250
5353
  */
5251
5354
  export function createOutputChannel(name: string): OutputChannel;
5252
5355
 
5356
+ /**
5357
+ * Creates a new {@link LogOutputChannel log output channel} with the given name.
5358
+ *
5359
+ * @param name Human-readable string which will be used to represent the channel in the UI.
5360
+ * @param options Options for the log output channel.
5361
+ */
5362
+ export function createOutputChannel(name: string, options: { log: true }): LogOutputChannel;
5363
+
5253
5364
  /**
5254
5365
  * Create new terminal.
5255
5366
  * @param name - terminal name to display on the UI.
@@ -7527,6 +7638,15 @@ export module '@theia/plugin' {
7527
7638
  */
7528
7639
  export function asExternalUri(target: Uri): Thenable<Uri>;
7529
7640
 
7641
+ /**
7642
+ * The current log level of the editor.
7643
+ */
7644
+ export const logLevel: LogLevel;
7645
+
7646
+ /**
7647
+ * An {@link Event} which fires when the log level of the editor changes.
7648
+ */
7649
+ export const onDidChangeLogLevel: Event<LogLevel>;
7530
7650
  }
7531
7651
 
7532
7652
  /**
@@ -12864,6 +12984,11 @@ export module '@theia/plugin' {
12864
12984
  */
12865
12985
  label?: string;
12866
12986
 
12987
+ /**
12988
+ * The optional state of a comment thread, which may affect how the comment is displayed.
12989
+ */
12990
+ state?: CommentThreadState;
12991
+
12867
12992
  /**
12868
12993
  * Dispose this comment thread.
12869
12994
  *
@@ -12877,6 +13002,14 @@ export module '@theia/plugin' {
12877
13002
  canReply: boolean;
12878
13003
  }
12879
13004
 
13005
+ /**
13006
+ * The state of a comment thread.
13007
+ */
13008
+ export enum CommentThreadState {
13009
+ Unresolved = 0,
13010
+ Resolved = 1
13011
+ }
13012
+
12880
13013
  /**
12881
13014
  * Author information of a {@link Comment comment}
12882
13015
  */
@@ -15439,6 +15572,14 @@ export interface TestRunProfile {
15439
15572
  */
15440
15573
  isDefault: boolean;
15441
15574
 
15575
+ /**
15576
+ * Whether this profile supports continuous running of requests. If so,
15577
+ * then {@link TestRunRequest.continuous} may be set to `true`. Defaults
15578
+ * to false.
15579
+ * @stubbed
15580
+ */
15581
+ supportsContinuousRun: boolean;
15582
+
15442
15583
  /**
15443
15584
  * Associated tag for the profile. If this is set, only {@link TestItem}
15444
15585
  * instances with the same tag will be eligible to execute in this profile.
@@ -15461,6 +15602,11 @@ export interface TestRunProfile {
15461
15602
  * associated with the request should be created before the function returns
15462
15603
  * or the returned promise is resolved.
15463
15604
  *
15605
+ * If {@link supportsContinuousRun} is set, then {@link TestRunRequest.continuous}
15606
+ * may be `true`. In this case, the profile should observe changes to
15607
+ * source code and create new test runs by calling {@link TestController.createTestRun},
15608
+ * until the cancellation is requested on the `token`.
15609
+ *
15464
15610
  * @param request Request information for the test run.
15465
15611
  * @param cancellationToken Token that signals the used asked to abort the
15466
15612
  * test run. If cancellation is requested on this token, all {@link TestRun}
@@ -15520,11 +15666,12 @@ export interface TestController {
15520
15666
  * @param runHandler Function called to start a test run.
15521
15667
  * @param isDefault Whether this is the default action for its kind.
15522
15668
  * @param tag Profile test tag.
15669
+ * @param supportsContinuousRun Whether the profile supports continuous running.
15523
15670
  * @returns An instance of a {@link TestRunProfile}, which is automatically
15524
15671
  * associated with this controller.
15525
15672
  * @stubbed
15526
15673
  */
15527
- createRunProfile(label: string, kind: TestRunProfileKind, runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void, isDefault?: boolean, tag?: TestTag): TestRunProfile;
15674
+ createRunProfile(label: string, kind: TestRunProfileKind, runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void, isDefault?: boolean, tag?: TestTag, supportsContinuousRun?: boolean): TestRunProfile;
15528
15675
 
15529
15676
  /**
15530
15677
  * A function provided by the extension that the editor may call to request
@@ -15644,12 +15791,19 @@ export class TestRunRequest {
15644
15791
  */
15645
15792
  readonly profile: TestRunProfile | undefined;
15646
15793
 
15794
+ /**
15795
+ * Whether the profile should run continuously as source code changes. Only
15796
+ * relevant for profiles that set {@link TestRunProfile.supportsContinuousRun}.
15797
+ */
15798
+ readonly continuous?: boolean;
15799
+
15647
15800
  /**
15648
15801
  * @param include Array of specific tests to run, or undefined to run all tests
15649
15802
  * @param exclude An array of tests to exclude from the run.
15650
15803
  * @param profile The run profile used for this request.
15804
+ * @param continuous Whether to run tests continuously as source changes.
15651
15805
  */
15652
- constructor(include?: readonly TestItem[], exclude?: readonly TestItem[], profile?: TestRunProfile);
15806
+ constructor(include?: readonly TestItem[], exclude?: readonly TestItem[], profile?: TestRunProfile, continuous?: boolean);
15653
15807
  }
15654
15808
 
15655
15809
  /**