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

    Plugins of a browser-only application are deployed at build time, so they can't be installed, uninstalled, enabled or disabled at runtime. The queries just report an empty result instead of failing, so callers like the plugin view still have something to render.

    The plugin key-value storage backing ExtensionContext.globalState and ExtensionContext.workspaceState lives in the browser's local storage.

    Implements

    Index

    Constructors

    Properties

    localLock: Mutex = ...

    Fallback for withStoreLock when the Web Locks API is unavailable.

    logger: ILogger
    missingLocksWarned: boolean = false
    pluginPathsService: PluginPathsService
    storageService: StorageService

    @theia/workspace rebinds StorageService to WorkspaceStorageService, which prefixes every key with the current workspace URI. That would scope GLOBAL_STORAGE_KEY per workspace too, so LocalStorageService is injected directly instead - the workspace store key already encodes the workspace via PluginPathsService.getHostStoragePath.

    Methods

    • Requests name from locks and runs callback once granted, same as LockManager.request().

      LockGrantedCallback is typed as (lock: Lock | null) => T, which doesn't account for an async or never-settling callback even though the API itself supports and awaits one, hence the cast. Kept as its own method so a subclass or test can swap the lock implementation.

      Type Parameters

      • T

      Parameters

      • locks: LockManager
      • name: string
      • callback: () => T | PromiseLike<T>

      Returns Promise<T>