Skip to content

Enhance resource configuration service #85884

Closed

Description

Enhance resource configuration service

  • Ability to update resource scoped value
  • A change event that is resource and lang aware

Activity

  1. changed the title [-]Provide basic methods in ITestResourceConfigurationService [/-] [+]Enhance resource configuration service[/+] on Dec 12, 2019
  2. added 2 commits that reference this issue on Dec 12, 2019
  3. sandy081 commented on Dec 12, 2019

    @sandy081
    MemberAuthor

    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;
    }

    Johannes Rieken (@jrieken) FYI

  4. locked and limited conversation to collaborators on Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debt

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions