@theia/plugin 1.24.0-next.4 → 1.24.0-next.40

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/README.md CHANGED
@@ -681,8 +681,9 @@ Example of code symbol provider registration:
681
681
  ```typescript
682
682
  const documentsSelector: theia.DocumentSelector = { scheme: 'file', language: 'typescript' };
683
683
  const provider = { provideDocumentSymbols: provideSymbols };
684
+ const metadata = { label: 'providerLabel' }
684
685
 
685
- const disposable = theia.languages.registerDocumentSymbolProvider(documentsSelector, provider);
686
+ const disposable = theia.languages.registerDocumentSymbolProvider(documentsSelector, provider, metadata);
686
687
 
687
688
  ...
688
689
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.24.0-next.4+a9202c789e2",
3
+ "version": "1.24.0-next.40+798f9d08504",
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": "a9202c789e2b0b5cbf48e35a85f7b00796fbf1fd"
35
+ "gitHead": "798f9d08504570fce130b9073d398c6782003c0d"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -6952,6 +6952,16 @@ export module '@theia/plugin' {
6952
6952
  provideDocumentSymbols(document: TextDocument, token: CancellationToken): ProviderResult<SymbolInformation[] | DocumentSymbol[]>;
6953
6953
  }
6954
6954
 
6955
+ /**
6956
+ * Metadata about a {@link DocumentSymbolProvider}.
6957
+ */
6958
+ export interface DocumentSymbolProviderMetadata {
6959
+ /**
6960
+ * A human-readable string that is shown when multiple outline trees show for one document.
6961
+ */
6962
+ label?: string;
6963
+ }
6964
+
6955
6965
  /**
6956
6966
  * Represents a color in RGBA space.
6957
6967
  */
@@ -8974,9 +8984,11 @@ export module '@theia/plugin' {
8974
8984
  *
8975
8985
  * @param selector A selector that defines the documents this provider is applicable to.
8976
8986
  * @param provider A document symbol provider.
8977
- * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
8987
+ * @param metadata Optional metadata about the provider.
8988
+ * @return A {@link Disposable disposable} that unregisters this provider when being disposed.
8978
8989
  */
8979
- export function registerDocumentSymbolProvider(selector: DocumentSelector, provider: DocumentSymbolProvider): Disposable;
8990
+ export function registerDocumentSymbolProvider(selector: DocumentSelector, provider: DocumentSymbolProvider,
8991
+ metadata?: DocumentSymbolProviderMetadata): Disposable;
8980
8992
 
8981
8993
  /**
8982
8994
  * Register a color provider.
@@ -11376,7 +11388,7 @@ export module '@theia/plugin' {
11376
11388
  * @param options The [getSessionOptions](#GetSessionOptions) to use
11377
11389
  * @returns A thenable that resolves to an authentication session
11378
11390
  */
11379
- export function getSession(providerId: string, scopes: string[], options: AuthenticationGetSessionOptions & { createIfNone: true }): Thenable<AuthenticationSession>;
11391
+ export function getSession(providerId: string, scopes: readonly string[], options: AuthenticationGetSessionOptions & { createIfNone: true }): Thenable<AuthenticationSession>;
11380
11392
 
11381
11393
  /**
11382
11394
  * Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
@@ -11404,7 +11416,7 @@ export module '@theia/plugin' {
11404
11416
  * @param options The [getSessionOptions](#GetSessionOptions) to use
11405
11417
  * @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions
11406
11418
  */
11407
- export function getSession(providerId: string, scopes: string[], options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
11419
+ export function getSession(providerId: string, scopes: readonly string[], options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
11408
11420
 
11409
11421
  /**
11410
11422
  * An [event](#Event) which fires when the authentication sessions of an authentication provider have