mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode 3c6f6af7347d38e87bc6406024e8dcf9e9bce229 (#8962)
* Merge from vscode 3c6f6af7347d38e87bc6406024e8dcf9e9bce229 * skip failing tests * update mac build image
This commit is contained in:
committed by
Karl Burtram
parent
0eaee18dc4
commit
fefe1454de
138
src/vs/vscode.d.ts
vendored
138
src/vs/vscode.d.ts
vendored
@@ -4240,16 +4240,52 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Represents the configuration. It is a merged view of
|
||||
*
|
||||
* - Default configuration
|
||||
* - Global configuration
|
||||
* - Workspace configuration (if available)
|
||||
* - Workspace folder configuration of the requested resource (if available)
|
||||
* - *Default Settings*
|
||||
* - *Global (User) Settings*
|
||||
* - *Workspace settings*
|
||||
* - *Workspace Folder settings* - From one of the [Workspace Folders](#workspace.workspaceFolders) under which requested resource belongs to.
|
||||
* - *Language settings* - Settings defined under requested language.
|
||||
*
|
||||
* *Global configuration* comes from User Settings and overrides Defaults.
|
||||
* The *effective* value (returned by [`get`](#WorkspaceConfiguration.get)) is computed by overriding or merging the values in the following order.
|
||||
*
|
||||
* *Workspace configuration* comes from Workspace Settings and overrides Global configuration.
|
||||
* ```
|
||||
* `defaultValue`
|
||||
* `globalValue` (if defined)
|
||||
* `workspaceValue` (if defined)
|
||||
* `workspaceFolderValue` (if defined)
|
||||
* `defaultLanguageValue` (if defined)
|
||||
* `globalLanguageValue` (if defined)
|
||||
* `workspaceLanguageValue` (if defined)
|
||||
* `workspaceFolderLanguageValue` (if defined)
|
||||
* ```
|
||||
* **Note:** Only `object` value types are merged and all other value types are overridden.
|
||||
*
|
||||
* *Workspace Folder configuration* comes from `.vscode` folder under one of the [workspace folders](#workspace.workspaceFolders) and overrides Workspace configuration.
|
||||
* Example 1: Overriding
|
||||
*
|
||||
* ```ts
|
||||
* defaultValue = 'on';
|
||||
* globalValue = 'relative'
|
||||
* workspaceFolderValue = 'off'
|
||||
* value = 'off'
|
||||
* ```
|
||||
*
|
||||
* Example 2: Language Values
|
||||
*
|
||||
* ```ts
|
||||
* defaultValue = 'on';
|
||||
* globalValue = 'relative'
|
||||
* workspaceFolderValue = 'off'
|
||||
* globalLanguageValue = 'on'
|
||||
* value = 'on'
|
||||
* ```
|
||||
*
|
||||
* Example 3: Object Values
|
||||
*
|
||||
* ```ts
|
||||
* defaultValue = { "a": 1, "b": 2 };
|
||||
* globalValue = { "b": 3, "c": 4 };
|
||||
* value = { "a": 1, "b": 3, "c": 4 };
|
||||
* ```
|
||||
*
|
||||
* *Note:* Workspace and Workspace Folder configurations contains `launch` and `tasks` settings. Their basename will be
|
||||
* part of the section identifier. The following snippets shows how to retrieve all configurations
|
||||
@@ -4257,7 +4293,7 @@ declare module 'vscode' {
|
||||
*
|
||||
* ```ts
|
||||
* // launch.json configuration
|
||||
* const config = workspace.getConfiguration('launch', vscode.window.activeTextEditor.document.uri);
|
||||
* const config = workspace.getConfiguration('launch', vscode.workspace.workspaceFolders[0].uri);
|
||||
*
|
||||
* // retrieve values
|
||||
* const values = config.get('configurations');
|
||||
@@ -4295,13 +4331,10 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Retrieve all information about a configuration setting. A configuration value
|
||||
* often consists of a *default* value, a global or installation-wide value,
|
||||
* a workspace-specific value and a folder-specific value.
|
||||
* a workspace-specific value, folder-specific value
|
||||
* and language-specific values (if [WorkspaceConfiguration](#WorkspaceConfiguration) is scoped to a language).
|
||||
*
|
||||
* The *effective* value (returned by [`get`](#WorkspaceConfiguration.get))
|
||||
* is computed like this: `defaultValue` overridden by `globalValue`,
|
||||
* `globalValue` overridden by `workspaceValue`. `workspaceValue` overridden by `workspaceFolderValue`.
|
||||
* Refer to [Settings](https://code.visualstudio.com/docs/getstarted/settings)
|
||||
* for more information.
|
||||
* Also provides all language ids under which the given configuration setting is defined.
|
||||
*
|
||||
* *Note:* The configuration name must denote a leaf in the configuration tree
|
||||
* (`editor.fontSize` vs `editor`) otherwise no result is returned.
|
||||
@@ -4309,43 +4342,53 @@ declare module 'vscode' {
|
||||
* @param section Configuration name, supports _dotted_ names.
|
||||
* @return Information about a configuration setting or `undefined`.
|
||||
*/
|
||||
inspect<T>(section: string): { key: string; defaultValue?: T; globalValue?: T; workspaceValue?: T, workspaceFolderValue?: T } | undefined;
|
||||
inspect<T>(section: string): {
|
||||
key: string;
|
||||
|
||||
defaultValue?: T;
|
||||
globalValue?: T;
|
||||
workspaceValue?: T,
|
||||
workspaceFolderValue?: T,
|
||||
|
||||
defaultLanguageValue?: T;
|
||||
userLanguageValue?: T;
|
||||
workspaceLanguageValue?: T;
|
||||
workspaceFolderLanguageValue?: T;
|
||||
|
||||
languageIds?: string[];
|
||||
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* Update a configuration value. The updated configuration values are persisted.
|
||||
*
|
||||
* A value can be changed in
|
||||
*
|
||||
* - [Global configuration](#ConfigurationTarget.Global): Changes the value for all instances of the editor.
|
||||
* - [Workspace configuration](#ConfigurationTarget.Workspace): Changes the value for current workspace, if available.
|
||||
* - [Workspace folder configuration](#ConfigurationTarget.WorkspaceFolder): Changes the value for the
|
||||
* [Workspace folder](#workspace.workspaceFolders) to which the current [configuration](#WorkspaceConfiguration) is scoped to.
|
||||
* - [Global settings](#ConfigurationTarget.Global): Changes the value for all instances of the editor.
|
||||
* - [Workspace settings](#ConfigurationTarget.Workspace): Changes the value for current workspace, if available.
|
||||
* - [Workspace folder settings](#ConfigurationTarget.WorkspaceFolder): Changes the value for settings from one of the [Workspace Folders](#workspace.workspaceFolders) under which the requested resource belongs to.
|
||||
* - Language settings: Changes the value for the requested languageId.
|
||||
*
|
||||
* *Note 1:* Setting a global value in the presence of a more specific workspace value
|
||||
* has no observable effect in that workspace, but in others. Setting a workspace value
|
||||
* in the presence of a more specific folder value has no observable effect for the resources
|
||||
* under respective [folder](#workspace.workspaceFolders), but in others. Refer to
|
||||
* [Settings Inheritance](https://code.visualstudio.com/docs/getstarted/settings) for more information.
|
||||
*
|
||||
* *Note 2:* To remove a configuration value use `undefined`, like so: `config.update('somekey', undefined)`
|
||||
*
|
||||
* Will throw error when
|
||||
* - Writing a configuration which is not registered.
|
||||
* - Writing a configuration to workspace or folder target when no workspace is opened
|
||||
* - Writing a configuration to folder target when there is no folder settings
|
||||
* - Writing to folder target without passing a resource when getting the configuration (`workspace.getConfiguration(section, resource)`)
|
||||
* - Writing a window configuration to folder target
|
||||
* *Note:* To remove a configuration value use `undefined`, like so: `config.update('somekey', undefined)`
|
||||
*
|
||||
* @param section Configuration name, supports _dotted_ names.
|
||||
* @param value The new value.
|
||||
* @param configurationTarget The [configuration target](#ConfigurationTarget) or a boolean value.
|
||||
* - If `true` configuration target is `ConfigurationTarget.Global`.
|
||||
* - If `false` configuration target is `ConfigurationTarget.Workspace`.
|
||||
* - If `undefined` or `null` configuration target is
|
||||
* `ConfigurationTarget.WorkspaceFolder` when configuration is resource specific
|
||||
* `ConfigurationTarget.Workspace` otherwise.
|
||||
* - If `true` updates [Global settings](#ConfigurationTarget.Global).
|
||||
* - If `false` updates [Workspace settings](#ConfigurationTarget.Workspace).
|
||||
* - If `undefined` or `null` updates to [Workspace folder settings](#ConfigurationTarget.WorkspaceFolder) if configuration is resource specific,
|
||||
* otherwise to [Workspace settings](#ConfigurationTarget.Workspace).
|
||||
* @param scopeToLanguage Whether to update the value in the scope of requested languageId or not.
|
||||
* - If `true` updates the value under the requested languageId.
|
||||
* - If `undefined` updates the value under the requested languageId only if the configuration is defined for the language.
|
||||
* @throws error while updating
|
||||
* - configuration which is not registered.
|
||||
* - window configuration to workspace folder
|
||||
* - configuration to workspace or workspace folder when no workspace is opened.
|
||||
* - configuration to workspace folder when there is no workspace folder settings.
|
||||
* - configuration to workspace folder when [WorkspaceConfiguration](#WorkspaceConfiguration) is not scoped to a resource.
|
||||
*/
|
||||
update(section: string, value: any, configurationTarget?: ConfigurationTarget | boolean): Thenable<void>;
|
||||
update(section: string, value: any, configurationTarget?: ConfigurationTarget | boolean, scopeToLanguage?: boolean): Thenable<void>;
|
||||
|
||||
/**
|
||||
* Readable dictionary that backs this configuration.
|
||||
@@ -8692,13 +8735,12 @@ declare module 'vscode' {
|
||||
* is returned. Dots in the section-identifier are interpreted as child-access,
|
||||
* like `{ myExt: { setting: { doIt: true }}}` and `getConfiguration('myExt.setting').get('doIt') === true`.
|
||||
*
|
||||
* When a resource is provided, configuration scoped to that resource is returned.
|
||||
* When a scope is provided configuraiton confined to that scope is returned. Scope can be a resource or a language identifier or both.
|
||||
*
|
||||
* @param section A dot-separated identifier.
|
||||
* @param resource A resource for which the configuration is asked for
|
||||
* @return The full configuration or a subset.
|
||||
*/
|
||||
export function getConfiguration(section?: string, resource?: Uri | null): WorkspaceConfiguration;
|
||||
export function getConfiguration(section?: string | undefined, scope?: ConfigurationScope | null): WorkspaceConfiguration;
|
||||
|
||||
/**
|
||||
* An event that is emitted when the [configuration](#WorkspaceConfiguration) changed.
|
||||
@@ -8730,19 +8772,21 @@ declare module 'vscode' {
|
||||
export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean, readonly isReadonly?: boolean }): Disposable;
|
||||
}
|
||||
|
||||
export type ConfigurationScope = Uri | TextDocument | WorkspaceFolder | { uri?: Uri, languageId: string };
|
||||
|
||||
/**
|
||||
* An event describing the change in Configuration
|
||||
*/
|
||||
export interface ConfigurationChangeEvent {
|
||||
|
||||
/**
|
||||
* Returns `true` if the given section for the given resource (if provided) is affected.
|
||||
* Returns `true` if the given section is affected in the provided scope.
|
||||
*
|
||||
* @param section Configuration name, supports _dotted_ names.
|
||||
* @param resource A resource Uri.
|
||||
* @return `true` if the given section for the given resource (if provided) is affected.
|
||||
* @param scope A scope in which to check.
|
||||
* @return `true` if the given section is affected in the provided scope.
|
||||
*/
|
||||
affectsConfiguration(section: string, resource?: Uri): boolean;
|
||||
affectsConfiguration(section: string, scope?: ConfigurationScope): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -10014,7 +10058,7 @@ declare module 'vscode' {
|
||||
export function getExtension(extensionId: string): Extension<any> | undefined;
|
||||
|
||||
/**
|
||||
* Get an extension its full identifier in the form of: `publisher.name`.
|
||||
* Get an extension by its full identifier in the form of: `publisher.name`.
|
||||
*
|
||||
* @param extensionId An extension identifier.
|
||||
* @return An extension or `undefined`.
|
||||
|
||||
Reference in New Issue
Block a user