Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StateManager

This class keeps track of all state that needs to persist between sessions within a single workspace. Objects that wish to persist state should store it here to ensure that we keep state consistent.

This uses VSCode's Memento objects to ensure consistency. The user cannot easily modify the contents of a Memento, so we can be sure that the contents won't be torn or invalid, unless we make them that way. This class prevents invalid states.

Hierarchy

  • StateManager

Index

Constructors

constructor

  • new StateManager(extensionContext: vscode.ExtensionContext): StateManager

Properties

extensionContext

extensionContext: vscode.ExtensionContext

Accessors

activeKitName

  • get activeKitName(): string | null
  • set activeKitName(v: string | null): void
  • The name of the workspace-local active kit.

    Returns string | null

  • The name of the workspace-local active kit.

    Parameters

    • v: string | null

    Returns void

activeVariantSettings

  • get activeVariantSettings(): Map<string, string> | null
  • set activeVariantSettings(settings: Map<string, string> | null): void
  • The keyword settings for the build variant

    Returns Map<string, string> | null

  • The keyword settings for the build variant

    Parameters

    • settings: Map<string, string> | null

    Returns void

defaultBuildTarget

  • get defaultBuildTarget(): string | null
  • set defaultBuildTarget(s: string | null): void
  • The currently select build target

    Returns string | null

  • The currently select build target

    Parameters

    • s: string | null

    Returns void

launchTargetName

  • get launchTargetName(): string | null
  • set launchTargetName(t: string | null): void
  • Returns string | null

  • Parameters

    • t: string | null

    Returns void

Methods

reset

  • reset(): void
  • Rest all current workspace state. Mostly for troubleshooting

    Returns void

Generated using TypeDoc