Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MockPreferenceProvider

Hierarchy

Index

Constructors

constructor

Properties

Protected _pendingChanges

_pendingChanges: Promise<boolean> = ...

Protected Readonly _ready

_ready: Deferred<void> = ...

Protected deferredChanges

deferredChanges: undefined | PreferenceProviderDataChanges

Protected fireDidPreferencesChanged

fireDidPreferencesChanged: (...arguments: []) => Promise<boolean> = ...

Type declaration

    • (...arguments: []): Promise<boolean>
    • Parameters

      • Rest ...arguments: []

      Returns Promise<boolean>

Readonly onDidPreferencesChanged

onDidPreferencesChanged: Event<PreferenceProviderDataChanges> = ...

Protected Readonly onDidPreferencesChangedEmitter

onDidPreferencesChangedEmitter: Emitter<PreferenceProviderDataChanges> = ...

Protected Readonly preferenceOverrideService

preferenceOverrideService: PreferenceLanguageOverrideService

Readonly prefs

prefs: {} = {}

Type declaration

  • [p: string]: any

Protected scope

Protected Readonly toDispose

toDispose: DisposableCollection = ...

Accessors

pendingChanges

  • get pendingChanges(): Promise<boolean>

ready

  • get ready(): Promise<void>

Methods

dispose

  • dispose(): void

Protected emitPreferencesChangedEvent

get

  • get<T>(preferenceName: string, resourceUri?: string): undefined | T
  • Retrieve the stored value for the given preference and resource URI.

    Type parameters

    • T

    Parameters

    • preferenceName: string

      the preference identifier.

    • Optional resourceUri: 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.

getConfigUri

  • getConfigUri(resourceUri?: string, sectionName?: string): undefined | default

Optional getContainingConfigUri

  • getContainingConfigUri(resourceUri?: string, sectionName?: string): undefined | default

getDomain

  • getDomain(): undefined | string[]

Protected getParsedContent

  • getParsedContent(jsonData: any): {}

getPreferences

  • getPreferences(): {}

markReady

  • markReady(): void

Protected mergePreferenceProviderDataChange

resolve

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

    Type parameters

    • T

    Parameters

    • preferenceName: string

      the preference identifier.

    • Optional resourceUri: 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.

setPreference

  • setPreference(preferenceName: string, newValue: any, resourceUri?: string): Promise<boolean>

Static deepEqual

  • deepEqual(a: undefined | null | string | number | boolean | JSONObject | JSONArray, b: undefined | null | string | number | boolean | JSONObject | JSONArray): boolean

Static merge

  • merge(source: undefined | null | string | number | boolean | JSONObject | JSONArray, target: JSONValue): JSONValue