Theia API Documentation v1.65.0
    Preparing search index...

    A

    that targets the user-level settings

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _fileExists: boolean
    _ready: Deferred<void>
    configurations: PreferenceConfigurations
    deferredChanges: undefined | PreferenceProviderDataChanges
    fireDidPreferencesChanged: () => Promise<boolean>
    loading: Deferred<void>
    onDidChangeValidityEmitter: Emitter<boolean>
    onDidPreferencesChanged: Event<PreferenceProviderDataChanges>
    onDidPreferencesChangedEmitter: Emitter<PreferenceProviderDataChanges>
    preferenceConfigurations: PreferenceConfigurations
    preferenceOverrideService: PreferenceLanguageOverrideService
    preferences: Record<string, any>
    preferenceStorage: PreferenceStorage
    preferenceStorageFactory: PreferenceStorageFactory
    schemaProvider: PreferenceSchemaService
    section: string
    uri: URI

    Accessors

    • set fileExists(exists: boolean): void

      Parameters

      • exists: boolean

      Returns void

    • get onDidChangeValidity(): Event<boolean>

      Returns Event<boolean>

    • get ready(): Promise<void>

      Resolved when the preference provider is ready to provide preferences It should be resolved by subclasses.

      Returns Promise<void>

    • get valid(): boolean

      Returns boolean

    Methods

    • Parameters

      • resourceUri: undefined | string

      Returns boolean

    • Dispose this object.

      Returns void

    • Returns Promise<void>

    • Parameters

      • key: string
      • path: string[]
      • value: JSONValue

      Returns Promise<boolean>

    • Retrieve the stored value for the given preference and resource URI.

      Type Parameters

      • T

      Parameters

      • preferenceName: string

        the preference identifier.

      • OptionalresourceUri: string

        the uri of the resource for which the preference is stored. This is used to retrieve a potentially different value for the same preference for different resources, for example files.encoding.

      Returns undefined | T

      the value stored for the given preference and resourceUri if it exists, otherwise undefined.

    • Retrieve the configuration URI for the given resource URI.

      Returns URI

      the corresponding resource URI or undefined if there is no valid URI.

    • Parameters

      • resourceUri: undefined | string

      Returns undefined | URI

    • Retrieves the first valid configuration URI contained by the given resource.

      Parameters

      • OptionalresourceUri: string

        the uri of the container resource or undefined.

      • OptionalsectionName: string

      Returns undefined | URI

      the first valid configuration URI contained by the given resource undefined if there is no valid configuration URI at all.

    • Retrieve the domain for this provider.

      Returns undefined | string[]

      the domain or undefined if this provider is suitable for all domains.

    • Parameters

      • jsonData: unknown

      Returns { [key: string]: unknown }

    • Return a JSONObject with all preferences stored in this preference provider

      Parameters

      • OptionalresourceUri: string

      Returns { [key: string]: any }

    • Parameters

      • newPrefs: { [key: string]: any }

      Returns void

    • Returns void

    • eslint-disable-next-line @typescript-eslint/no-explicit-any

      Parameters

      • content: string

      Returns any

    • Returns void

    • Resolve the value for the given preference and resource URI.

      Type Parameters

      • T

      Parameters

      • preferenceName: string

        the preference identifier.

      • OptionalresourceUri: string

        the URI of the resource for which this provider should resolve the preference. This is used to retrieve a potentially different value for the same preference for different resources, for example files.encoding.

      Returns PreferenceResolveResult<T>

      an object containing the value stored for the given preference and resourceUri if it exists, otherwise undefined.

    • Stores a new value for the given preference key in the provider.

      Parameters

      • key: string

        the preference key (typically the name).

      • value: any

        the new preference value.

      • OptionalresourceUri: string

        the URI of the resource for which the preference is stored.

      Returns Promise<boolean>

      a promise that only resolves if all changes were delivered. If changes were made then implementation must either await on this.emitPreferencesChangedEvent(...) or this.pendingChanges if changes are fired indirectly.