Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Workspace

A workspace (handler).

Hierarchy

  • WorkspaceBase
    • Workspace

Implements

  • Disposable
  • Workspace

Index

Constructors

constructor

  • new Workspace(folder: vscode.WorkspaceFolder): Workspace
  • Initializes a new instance of that class.

    Parameters

    • folder: vscode.WorkspaceFolder

      The underlying folder.

    Returns Workspace

Properties

Protected _DISPOSABLES

_DISPOSABLES: vscode.Disposable[]

Stores disposable sub objects.

Protected _INTERVALS

_INTERVALS: Timer[]

Stores intervals.

Protected _TIMEOUTS

_TIMEOUTS: Timer[]

Stores timeouts.

Private _config

_config: Config

Private _configSrc

_configSrc: WorkspaceConfigSource

Private _isReloadingConfig

_isReloadingConfig: boolean = false

executeOpenRequestsOnStartup

executeOpenRequestsOnStartup: boolean = false

Execute 'openRequestsOnStartup()' method when reloading config or not.

folder

folder: vscode.WorkspaceFolder

isDisposed

isDisposed: boolean

Gets if object has been disposed or not.

isDisposing

isDisposing: boolean

Gets if the 'dispose()' method is currently executed or not.

isInFinalizeState

isInFinalizeState: boolean

Gets if the object is disposed or currently disposing.

rootPath

rootPath: string
inheritdoc

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

config

configSource

  • get configSource(): WorkspaceConfigSource
  • inheritdoc

    Returns WorkspaceConfigSource

Methods

addListener

  • addListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

Protected cleanupIntervals

  • cleanupIntervals(): void
  • Cleansup all timeouts.

    Returns void

Protected cleanupTimeouts

  • cleanupTimeouts(): void
  • Cleansup all timeouts.

    Returns void

dispose

  • dispose(): void
  • inheritdoc

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getExistingPath

  • getExistingPath(p: string): string | false
  • Tries to return aa full path of an existing element.

    Parameters

    • p: string

      The path of the element.

    Returns string | false

    The full path or (false) if not found.

getMaxListeners

  • getMaxListeners(): number
  • Returns number

initialize

  • initialize(): Promise<void>
  • Initializes that workspace object.

    Returns Promise<void>

isPathOf

  • isPathOf(p: string): boolean
  • Checks if a path is inside that workspace or not.

    Parameters

    • p: string

      The path to check.

    Returns boolean

    Is path of or not.

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

on

  • on(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

onDidChangeConfiguration

  • onDidChangeConfiguration(): Promise<void>
  • inheritdoc

    Returns Promise<void>

Protected onDispose

  • onDispose(): void
  • Additional logic for the 'dispose()' method.

    Returns void

once

  • once(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

openRequestsOnStartup

  • openRequestsOnStartup(): Promise<void>
  • Opens all requests that should be opened on startup.

    Returns Promise<void>

prependListener

  • prependListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc