Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance resource configuration service #85884

Closed
sandy081 opened this issue Dec 1, 2019 · 1 comment · Fixed by #86854
Closed

Enhance resource configuration service #85884

sandy081 opened this issue Dec 1, 2019 · 1 comment · Fixed by #86854
Assignees
Labels
debt Code quality issues
Milestone

Comments

@sandy081
Copy link
Member

sandy081 commented Dec 1, 2019

Enhance resource configuration service

  • Ability to update resource scoped value
  • A change event that is resource and lang aware
@sandy081 sandy081 added the debt Code quality issues label Dec 1, 2019
@sandy081 sandy081 added this to the Backlog milestone Dec 1, 2019
@sandy081 sandy081 self-assigned this Dec 1, 2019
@sandy081 sandy081 changed the title Provide basic methods in ITestResourceConfigurationService Enhance resource configuration service Dec 12, 2019
sandy081 added a commit that referenced this issue Dec 12, 2019
sandy081 added a commit that referenced this issue Dec 12, 2019
@sandy081
Copy link
Member Author

sandy081 commented Dec 12, 2019

Added following:

updateValue

/**
* Update the configuration value for the given resource at the effective location.
*
* - If configurationTarget is not specified, target will be derived by checking where the configuration is defined.
* - If the language overrides for the give resource contains the configuration, then it is updated.
*
* @param resource Resource for which the configuration has to be updated
* @param key Configuration key
* @param value Configuration value
* @param configurationTarget Optional target into which the configuration has to be updated.
* If not specified, target will be derived by checking where the configuration is defined.
*/
updateValue(resource: URI, key: string, value: any, configurationTarget?: ConfigurationTarget): Promise<void>;

IResourceConfigurationChangeEvent

export interface IResourceConfigurationChangeEvent {
/**
* All affected keys. Also includes language overrides and keys changed under language overrides.
*/
readonly affectedKeys: string[];
/**
* Returns `true` if the given section has changed for the given resource.
*
* Example: To check if the configuration section has changed for a given resource use `e.affectsConfiguration(resource, section)`.
*
* @param resource Resource for which the configuration has to be checked.
* @param section Section of the configuration
*/
affectsConfiguration(resource: URI, section: string): boolean;
}

@jrieken FYI

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant