@theia/plugin 1.29.0-next.7 → 1.29.0-next.9

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 +60 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.29.0-next.7+5aeef6c0c68",
3
+ "version": "1.29.0-next.9+7b29ac6f2d1",
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": "5aeef6c0c683b4e91713ab736957e6655b486adc"
35
+ "gitHead": "7b29ac6f2d1a75b44b5c5d37ec7ae0200e0c3e99"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -9276,6 +9276,18 @@ export module '@theia/plugin' {
9276
9276
  */
9277
9277
  export function registerHoverProvider(selector: DocumentSelector, provider: HoverProvider): Disposable;
9278
9278
 
9279
+ /**
9280
+ * Register a provider that locates evaluatable expressions in text documents.
9281
+ * The editor will evaluate the expression in the active debug session and will show the result in the debug hover.
9282
+ *
9283
+ * If multiple providers are registered for a language an arbitrary provider will be used.
9284
+ *
9285
+ * @param selector A selector that defines the documents this provider is applicable to.
9286
+ * @param provider An evaluatable expression provider.
9287
+ * @return A {@link Disposable} that unregisters this provider when being disposed.
9288
+ */
9289
+ export function registerEvaluatableExpressionProvider(selector: DocumentSelector, provider: EvaluatableExpressionProvider): Disposable;
9290
+
9279
9291
  /**
9280
9292
  * Register a workspace symbol provider.
9281
9293
  *
@@ -9589,6 +9601,54 @@ export module '@theia/plugin' {
9589
9601
  provideHover(document: TextDocument, position: Position, token: CancellationToken | undefined): ProviderResult<Hover>;
9590
9602
  }
9591
9603
 
9604
+ /**
9605
+ * An EvaluatableExpression represents an expression in a document that can be evaluated by an active debugger or runtime.
9606
+ * The result of this evaluation is shown in a tooltip-like widget.
9607
+ * If only a range is specified, the expression will be extracted from the underlying document.
9608
+ * An optional expression can be used to override the extracted expression.
9609
+ * In this case the range is still used to highlight the range in the document.
9610
+ */
9611
+ export class EvaluatableExpression {
9612
+
9613
+ /*
9614
+ * The range is used to extract the evaluatable expression from the underlying document and to highlight it.
9615
+ */
9616
+ readonly range: Range;
9617
+
9618
+ /*
9619
+ * If specified the expression overrides the extracted expression.
9620
+ */
9621
+ readonly expression?: string | undefined;
9622
+
9623
+ /**
9624
+ * Creates a new evaluatable expression object.
9625
+ *
9626
+ * @param range The range in the underlying document from which the evaluatable expression is extracted.
9627
+ * @param expression If specified overrides the extracted expression.
9628
+ */
9629
+ constructor(range: Range, expression?: string);
9630
+ }
9631
+
9632
+ /**
9633
+ * The evaluatable expression provider interface defines the contract between extensions and
9634
+ * the debug hover. In this contract the provider returns an evaluatable expression for a given position
9635
+ * in a document and the editor evaluates this expression in the active debug session and shows the result in a debug hover.
9636
+ */
9637
+ export interface EvaluatableExpressionProvider {
9638
+ /**
9639
+ * Provide an evaluatable expression for the given document and position.
9640
+ * The editor will evaluate this expression in the active debug session and will show the result in the debug hover.
9641
+ * The expression can be implicitly specified by the range in the underlying document or by explicitly returning an expression.
9642
+ *
9643
+ * @param document The document for which the debug hover is about to appear.
9644
+ * @param position The line and character position in the document where the debug hover is about to appear.
9645
+ * @param token A cancellation token.
9646
+ * @return An EvaluatableExpression or a thenable that resolves to such. The lack of a result can be
9647
+ * signaled by returning `undefined` or `null`.
9648
+ */
9649
+ provideEvaluatableExpression(document: TextDocument, position: Position, token: CancellationToken | undefined): ProviderResult<EvaluatableExpression>;
9650
+ }
9651
+
9592
9652
  /**
9593
9653
  * A document highlight kind.
9594
9654
  */