ExtensionContext
An extension context is a collection of utilities private to an extension.
An instance of an ExtensionContext
is provided as the first parameter to the activate
-call of an extension.
Properties
Gets the extension's global environment variable collection for this workspace, enabling changes to be applied to terminal environment variables.
The mode the extension is running in. See ExtensionMode for possible values and scenarios.
The absolute file path of the directory containing the extension. Shorthand notation for ExtensionContext.extensionUri.fsPath (independent of the uri scheme).
The uri of the directory containing the extension.
The uri of a directory in which the extension can store global state. The directory might not exist on disk and creation is up to the extension. However, the parent directory is guaranteed to be existent.
An object that keeps information about how this extension can use language models.
A secret storage object that stores state independent of the current opened workspace.
The uri of a workspace specific directory in which the extension can store private state. The directory might not exist and creation is up to the extension. However, the parent directory is guaranteed to be existent. The value is undefined
when no workspace nor folder has been opened.
An array to which disposables can be added. When this extension is deactivated the disposables will be disposed.
A memento object that stores state in the context of the currently opened workspace.