Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SectionPreferenceProvider Abstract

This class encapsulates the logic of using separate files for some workspace configuration like 'launch.json' or 'tasks.json'. Anything that is not a contributed section will be in the main config file.

Hierarchy

Index

Constructors

Properties

_fileExists: boolean = false
_isSection?: boolean
configurations: PreferenceConfigurations
fileService: FileService
loading: Deferred<void> = ...
onDidChangeValidityEmitter: Emitter<boolean> = ...
preferenceConfigurations: PreferenceConfigurations
preferences: Record<string, any> = {}
schemaProvider: PreferenceSchemaProvider
section: string
transaction: undefined | PreferenceTransaction
transactionFactory: PreferenceTransactionFactory
uri: URI
workspaceService: WorkspaceService

Accessors

  • set fileExists(exists: boolean): void
  • get isSection(): boolean
  • get onDidChangeValidity(): Event<boolean>
  • get valid(): boolean

Methods

  • contains(resourceUri: undefined | string): boolean
  • doInit(): Promise<void>
  • doSetPreference(key: string, path: string[], value: unknown): Promise<boolean>
  • getConfigUri(): URI
  • getConfigUri(resourceUri: undefined | string): undefined | URI
  • getPath(preferenceName: string): undefined | string[]
  • getPreferences(resourceUri?: string): {}
  • getScope(): PreferenceScope
  • getUri(): URI
  • handlePreferenceChanges(newPrefs: {}): void
  • init(): void
  • parse(content: string): any
  • readPreferencesFromContent(content: string): void
  • readPreferencesFromFile(): Promise<void>
  • reset(): void
  • setPreference(key: string, value: any, resourceUri?: string): Promise<boolean>