@theia/plugin 1.28.0-next.9 → 1.29.0-next.10

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 +3 -3
  2. package/src/theia.d.ts +167 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.28.0-next.9+c0ee4dcf6bb",
3
+ "version": "1.29.0-next.10+c617a60355d",
4
4
  "description": "Theia - Plugin API",
5
5
  "types": "./src/theia.d.ts",
6
6
  "publishConfig": {
@@ -27,10 +27,10 @@
27
27
  "watch": "theiaext watch"
28
28
  },
29
29
  "devDependencies": {
30
- "@theia/ext-scripts": "1.27.0"
30
+ "@theia/ext-scripts": "1.28.0"
31
31
  },
32
32
  "nyc": {
33
33
  "extends": "../../configs/nyc.json"
34
34
  },
35
- "gitHead": "c0ee4dcf6bb10be905cc5a58d04b10faa3800d67"
35
+ "gitHead": "c617a60355d5cbfaf1fecb3554cda9329eeeb1f9"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -617,7 +617,7 @@ export module '@theia/plugin' {
617
617
  * Provides additional metadata over normal [location](#Location) definitions, including the range of
618
618
  * the defining symbol
619
619
  */
620
- export interface DefinitionLink {
620
+ export interface LocationLink {
621
621
  /**
622
622
  * Span of the symbol being defined in the source file.
623
623
  *
@@ -2300,6 +2300,11 @@ export module '@theia/plugin' {
2300
2300
  * Options for configuration behavior of the quick pick
2301
2301
  */
2302
2302
  export interface QuickPickOptions {
2303
+ /**
2304
+ * An optional string that represents the title of the quick pick.
2305
+ */
2306
+ title?: string;
2307
+
2303
2308
  /**
2304
2309
  * A flag to include the description when filtering
2305
2310
  */
@@ -3464,6 +3469,13 @@ export module '@theia/plugin' {
3464
3469
  */
3465
3470
  export interface Memento {
3466
3471
 
3472
+ /**
3473
+ * Returns the stored keys.
3474
+ *
3475
+ * @return The stored keys.
3476
+ */
3477
+ keys(): readonly string[];
3478
+
3467
3479
  /**
3468
3480
  * Return a value.
3469
3481
  *
@@ -5635,12 +5647,14 @@ export module '@theia/plugin' {
5635
5647
  * Returns `true` if the given section for the given resource (if provided) is affected.
5636
5648
  *
5637
5649
  * @param section Configuration name, supports _dotted_ names.
5638
- * @param resource A resource Uri.
5650
+ * @param scope a {@link ConfigurationScope}
5639
5651
  * @return `true` if the given section for the given resource (if provided) is affected.
5640
5652
  */
5641
- affectsConfiguration(section: string, resource?: Uri): boolean;
5653
+ affectsConfiguration(section: string, scope?: ConfigurationScope): boolean;
5642
5654
  }
5643
5655
 
5656
+ export type ConfigurationScope = Uri | WorkspaceFolder | TextDocument | { uri?: Uri, languageId: string };
5657
+
5644
5658
  /**
5645
5659
  * An event describing a change to the set of [workspace folders](#workspace.workspaceFolders).
5646
5660
  */
@@ -6295,13 +6309,13 @@ export module '@theia/plugin' {
6295
6309
  * is returned. Dots in the section-identifier are interpreted as child-access,
6296
6310
  * like `{ myExt: { setting: { doIt: true }}}` and `getConfiguration('myExt.setting').get('doIt') === true`.
6297
6311
  *
6298
- * When a resource is provided, configuration scoped to that resource is returned.
6312
+ * When a scope is provided configuration confined to that scope is returned. Scope can be a resource or a language identifier or both.
6299
6313
  *
6300
6314
  * @param section A dot-separated identifier.
6301
- * @param resource A resource for which the configuration is asked for
6315
+ * @param scope A scope for which the configuration is asked for.
6302
6316
  * @return The full configuration or a subset.
6303
6317
  */
6304
- export function getConfiguration(section?: string, resource?: Uri | null): WorkspaceConfiguration;
6318
+ export function getConfiguration(section?: string, scope?: ConfigurationScope | null): WorkspaceConfiguration;
6305
6319
 
6306
6320
  /**
6307
6321
  * An event that is emitted when the [configuration](#WorkspaceConfiguration) changed.
@@ -6528,6 +6542,14 @@ export module '@theia/plugin' {
6528
6542
  */
6529
6543
  export const appRoot: string;
6530
6544
 
6545
+ /**
6546
+ * The hosted location of the application
6547
+ * On desktop this is 'desktop'
6548
+ * In the web this is the specified embedder i.e. 'github.dev', 'codespaces', or 'web' if the embedder
6549
+ * does not provide that information
6550
+ */
6551
+ export const appHost: string;
6552
+
6531
6553
  /**
6532
6554
  * The custom uri scheme the editor registers to in the operating system.
6533
6555
  */
@@ -6538,6 +6560,35 @@ export module '@theia/plugin' {
6538
6560
  */
6539
6561
  export const language: string;
6540
6562
 
6563
+ /**
6564
+ * Indicates that this is a fresh install of the application.
6565
+ * `true` if within the first day of installation otherwise `false`.
6566
+ */
6567
+ export const isNewAppInstall: boolean;
6568
+
6569
+ /**
6570
+ * Indicates whether the users has telemetry enabled.
6571
+ * Can be observed to determine if the extension should send telemetry.
6572
+ */
6573
+ export const isTelemetryEnabled: boolean;
6574
+
6575
+ /**
6576
+ * An {@link Event} which fires when the user enabled or disables telemetry.
6577
+ * `true` if the user has enabled telemetry or `false` if the user has disabled telemetry.
6578
+ */
6579
+ export const onDidChangeTelemetryEnabled: Event<boolean>;
6580
+
6581
+ /**
6582
+ * The name of a remote. Defined by extensions, popular samples are `wsl` for the Windows
6583
+ * Subsystem for Linux or `ssh-remote` for remotes using a secure shell.
6584
+ *
6585
+ * *Note* that the value is `undefined` when there is no remote extension host but that the
6586
+ * value is defined in all extension hosts (local and remote) in case a remote extension host
6587
+ * exists. Use {@link Extension.extensionKind} to know if
6588
+ * a specific extension runs remote or not.
6589
+ */
6590
+ export const remoteName: string | undefined;
6591
+
6541
6592
  /**
6542
6593
  * The detected default shell for the extension host.
6543
6594
  */
@@ -6889,6 +6940,13 @@ export module '@theia/plugin' {
6889
6940
  */
6890
6941
  parameters: ParameterInformation[];
6891
6942
 
6943
+ /**
6944
+ * The index of the active parameter.
6945
+ *
6946
+ * If provided, this is used in place of SignatureHelp.activeParameter.
6947
+ */
6948
+ activeParameter?: number;
6949
+
6892
6950
  /**
6893
6951
  * Creates a new signature information object.
6894
6952
  *
@@ -7840,10 +7898,12 @@ export module '@theia/plugin' {
7840
7898
  }
7841
7899
 
7842
7900
  /**
7843
- * Represents the connection of two locations. Provides additional metadata over normal {@link Location locations},
7844
- * including an origin range.
7901
+ * Information about where a symbol is defined.
7902
+ *
7903
+ * Provides additional metadata over normal {@link Location} definitions, including the range of
7904
+ * the defining symbol
7845
7905
  */
7846
- export type LocationLink = DefinitionLink;
7906
+ export type DefinitionLink = LocationLink;
7847
7907
 
7848
7908
  /**
7849
7909
  * The declaration of a symbol representation as one or many {@link Location locations}
@@ -9216,6 +9276,18 @@ export module '@theia/plugin' {
9216
9276
  */
9217
9277
  export function registerHoverProvider(selector: DocumentSelector, provider: HoverProvider): Disposable;
9218
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
+
9219
9291
  /**
9220
9292
  * Register a workspace symbol provider.
9221
9293
  *
@@ -9529,6 +9601,54 @@ export module '@theia/plugin' {
9529
9601
  provideHover(document: TextDocument, position: Position, token: CancellationToken | undefined): ProviderResult<Hover>;
9530
9602
  }
9531
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
+
9532
9652
  /**
9533
9653
  * A document highlight kind.
9534
9654
  */
@@ -9609,6 +9729,11 @@ export module '@theia/plugin' {
9609
9729
  * A string to show as place holder in the input box to guide the user.
9610
9730
  */
9611
9731
  placeholder: string;
9732
+
9733
+ /**
9734
+ * Controls whether the input box is visible (default is true).
9735
+ */
9736
+ visible: boolean;
9612
9737
  }
9613
9738
 
9614
9739
  interface QuickDiffProvider {
@@ -9851,6 +9976,20 @@ export module '@theia/plugin' {
9851
9976
  // Properties: see details [here](https://microsoft.github.io/debug-adapter-protocol/specification#Base_Protocol_ProtocolMessage).
9852
9977
  }
9853
9978
 
9979
+ /**
9980
+ * A DebugProtocolBreakpoint is an opaque stand-in type for the [Breakpoint](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Breakpoint) type defined in the Debug Adapter Protocol.
9981
+ */
9982
+ export interface DebugProtocolBreakpoint {
9983
+ // Properties: see details [here](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Breakpoint)
9984
+ }
9985
+
9986
+ /**
9987
+ * A DebugProtocolSource is an opaque stand-in type for the [Source](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Source) type defined in the Debug Adapter Protocol.
9988
+ */
9989
+ export interface DebugProtocolSource {
9990
+ // Properties: see details [here](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Source)
9991
+ }
9992
+
9854
9993
  /**
9855
9994
  * Configuration for a debug session.
9856
9995
  */
@@ -9910,6 +10049,15 @@ export module '@theia/plugin' {
9910
10049
  * Send a custom request to the debug adapter.
9911
10050
  */
9912
10051
  customRequest(command: string, args?: any): Thenable<any>;
10052
+
10053
+ /**
10054
+ * Maps a breakpoint in the editor to the corresponding Debug Adapter Protocol (DAP) breakpoint that
10055
+ * is managed by the debug adapter of the debug session. If no DAP breakpoint exists (either because
10056
+ * the editor breakpoint was not yet registered or because the debug adapter is not interested in the
10057
+ * breakpoint), the value undefined is returned.
10058
+ * @param breakpoint a Breakpoint in the editor.
10059
+ */
10060
+ getDebugProtocolBreakpoint(breakpoint: Breakpoint): PromiseLike<DebugProtocolBreakpoint | undefined>
9913
10061
  }
9914
10062
 
9915
10063
  /**
@@ -10385,6 +10533,16 @@ export module '@theia/plugin' {
10385
10533
  */
10386
10534
  export function registerDebugAdapterDescriptorFactory(debugType: string, factory: DebugAdapterDescriptorFactory): Disposable;
10387
10535
 
10536
+ /**
10537
+ * Converts a "Source" descriptor object received via the Debug Adapter Protocol into a Uri that can be used to load its contents.
10538
+ * If the source descriptor is based on a path, a file Uri is returned. If the source descriptor uses a reference number, a
10539
+ * specific debug Uri (scheme 'debug') is constructed that requires a corresponding ContentProvider and a running debug session
10540
+ * If the "Source" descriptor has insufficient information for creating the Uri, an error is thrown.
10541
+ * @param source An object conforming to the Source type defined in the Debug Adapter Protocol.
10542
+ * @param session An optional debug session that will be used when the source descriptor uses a reference number to load the contents from an active debug session.
10543
+ */
10544
+ export function asDebugSourceUri(source: DebugProtocolSource, session?: DebugSession): Uri;
10545
+
10388
10546
  /**
10389
10547
  * Register a {@link DebugConfigurationProvider debug configuration provider} for a specific debug type.
10390
10548
  * The optional {@link DebugConfigurationProviderTriggerKind triggerKind} can be used to specify when the `provideDebugConfigurations` method of the provider is triggered.