AboutSupportDeveloper GuideVersion 22.3.18

Constructors

Properties

instance: Dock3Provider = null

Accessors

  • get config(): Dock3Config
  • Read-only access to the current configuration of the Dock3Provider.

    Returns Dock3Config

  • set config(newConfig): void
  • Protected setter for the configuration of the Dock3Provider. This does not save the configuration in storage nor notify the dock about the change. Use updateConfig method to update the configuration and save it. This should only be used internally in a saveConfig override if super.saveConfig is not called.

    Parameters

    Returns void

  • get ready(): Promise<void>
  • Returns a promise that resolves when the Dock3Provider is ready. This is useful to ensure that the dock is fully initialized before performing any operations. The promise will resolve when the dock sends the 'ready' action.

    Returns Promise<void>

Methods

  • Returns _Window

  • Called on startup to load the current configuration of the Dock3Provider. If you've overridden the saveConfig method, this should load the configuration from your storage. By default it will load the configuration from local storage. This can be overriden to prevent loading from local storage.

    Returns Promise<Dock3Config>

    The current configuration of the Dock3Provider.

    class MyDock3Provider extends Dock3Provider {
    async loadConfig(): Promise<Dock3Config> {
    // Do not load from local storage, return the default config
    return this.config;
    }
    }
    class MyDock3Provider extends Dock3Provider {
    async loadConfig(): Promise<Dock3Config> {
    // Load from a custom storage
    const configFromStorage = await myCustomStorage.getDockConfig();
    // Update local config to ensure it is used.
    if (configFromStorage) {
    this.config = configFromStorage;
    }
    return this.config;
    }
    }
  • Called whenever the configuration is updated, this method saves the configuration to the storage. This should not be called directly, if you need to update the configuration, use updateConfig method instead.

    Parameters

    Returns Promise<void>

  • Shuts down the Dock3Provider and closes the dock window. This method sends a shutdown message to the dock and then closes the window.

    Returns Promise<void>

  • Updates the configuration of the Dock3Provider. This method updates the configuration, notifies the dock about the change and saves the new configuration to storage (via saveConfig).

    Parameters

    Returns Promise<void>