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.
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.
(as-absolute-path extension-context relative-path)
Get the absolute path of a resource contained in the extension.
Note that an absolute uri can be constructed via {@linkcode Uri.joinPath } and
{@linkcode ExtensionContext.extensionUri extensionUri}, e.g. vscode.Uri.joinPath(context.extensionUri, relativePath);
Parameters:
relative-path
: string
- A relative path to a resource contained in the extension.Returns: string
- The absolute path of the resource.
Get the absolute path of a resource contained in the extension. *Note* that an absolute uri can be constructed via {@linkcode Uri.joinPath } and {@linkcode ExtensionContext.extensionUri extensionUri}, e.g. `vscode.Uri.joinPath(context.extensionUri, relativePath);` **Parameters:** - `relative-path`: `string` - A relative path to a resource contained in the extension. **Returns:** `string` - The absolute path of the resource.
(environment-variable-collection extension-context)
Gets the extension's global environment variable collection for this workspace, enabling changes to be applied to terminal environment variables.
Gets the extension's global environment variable collection for this workspace, enabling changes to be applied to terminal environment variables.
(extension extension-context)
The current Extension
instance.
The current `Extension` instance.
(extension-mode extension-context)
The mode the extension is running in. See {@link ExtensionMode } for possible values and scenarios.
The mode the extension is running in. See {@link ExtensionMode } for possible values and scenarios.
(extension-path extension-context)
The absolute file path of the directory containing the extension. Shorthand notation for {@link TextDocument.uri ExtensionContext.extensionUri.fsPath} (independent of the uri scheme).
The absolute file path of the directory containing the extension. Shorthand notation for {@link TextDocument.uri ExtensionContext.extensionUri.fsPath} (independent of the uri scheme).
(extension-uri extension-context)
The uri of the directory containing the extension.
The uri of the directory containing the extension.
(global-state extension-context)
A memento object that stores state independent of the current opened {@link workspace.workspaceFolders workspace}.
A memento object that stores state independent of the current opened {@link workspace.workspaceFolders workspace}.
(global-storage-path extension-context)
An absolute file path 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.
Use {@linkcode ExtensionContext.globalState globalState} to store key value data.
An absolute file path 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. Use {@linkcode ExtensionContext.globalState globalState} to store key value data.
(global-storage-uri extension-context)
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.
Use {@linkcode ExtensionContext.globalState globalState} to store key value data.
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. Use {@linkcode ExtensionContext.globalState globalState} to store key value data.
(log-path extension-context)
An absolute file path of a directory in which the extension can create log files. The directory might not exist on disk and creation is up to the extension. However, the parent directory is guaranteed to be existent.
An absolute file path of a directory in which the extension can create log files. The directory might not exist on disk and creation is up to the extension. However, the parent directory is guaranteed to be existent.
(log-uri extension-context)
The uri of a directory in which the extension can create log files. The directory might not exist on disk and creation is up to the extension. However, the parent directory is guaranteed to be existent.
The uri of a directory in which the extension can create log files. The directory might not exist on disk and creation is up to the extension. However, the parent directory is guaranteed to be existent.
(secrets extension-context)
A storage utility for secrets. Secrets are persisted across reloads and are independent of the current opened {@link workspace.workspaceFolders workspace}.
A storage utility for secrets. Secrets are persisted across reloads and are independent of the current opened {@link workspace.workspaceFolders workspace}.
(storage-path extension-context)
An absolute file path of a workspace specific directory in which the extension can store private state. The directory might not exist on disk and creation is up to the extension. However, the parent directory is guaranteed to be existent.
Use {@linkcode ExtensionContext.workspaceState workspaceState} or {@linkcode ExtensionContext.globalState globalState} to store key value data.
An absolute file path of a workspace specific directory in which the extension can store private state. The directory might not exist on disk and creation is up to the extension. However, the parent directory is guaranteed to be existent. Use {@linkcode ExtensionContext.workspaceState workspaceState} or {@linkcode ExtensionContext.globalState globalState} to store key value data.
(storage-uri extension-context)
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.
Use {@linkcode ExtensionContext.workspaceState workspaceState} or {@linkcode ExtensionContext.globalState globalState} to store key value data.
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. Use {@linkcode ExtensionContext.workspaceState workspaceState} or {@linkcode ExtensionContext.globalState globalState} to store key value data.
(subscriptions extension-context)
An array to which disposables can be added. When this extension is deactivated the disposables will be disposed.
Note that asynchronous dispose-functions aren't awaited.
An array to which disposables can be added. When this extension is deactivated the disposables will be disposed. *Note* that asynchronous dispose-functions aren't awaited.
(workspace-state extension-context)
A memento object that stores state in the context of the currently opened {@link workspace.workspaceFolders workspace}.
A memento object that stores state in the context of the currently opened {@link workspace.workspaceFolders workspace}.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close