From c8e27e1cfe0faaf709a3d7054c850898a0c220c9 Mon Sep 17 00:00:00 2001 From: Dakota Bazan <148282997+DakotaB75@users.noreply.github.com> Date: Fri, 26 Dec 2025 15:58:03 -0300 Subject: [PATCH] docs(reference): add missing when clause context keys This PR updates the when clause context reference to include context keys that are already documented and used across other VS Code extension guides (Testing, SCM, Web Extensions, Workspace Trust), but were missing from the central reference table. The change is documentation-only and does not introduce new behavior or assumptions. --- api/references/when-clause-contexts.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/references/when-clause-contexts.md b/api/references/when-clause-contexts.md index 3fbafb270f..b331ceb7f2 100644 --- a/api/references/when-clause-contexts.md +++ b/api/references/when-clause-contexts.md @@ -172,6 +172,9 @@ Context name | True when `resourceFilename` | True when the Explorer or editor filename matches.
Example: `"resourceFilename == gulpfile.js"` `resourceExtname` | True when the Explorer or editor filename extension matches.
Example: `"resourceExtname == .js"` `resourceDirname` | True when the Explorer or editor's resource absolute folder path matches.
Example: `"resourceDirname == /users/alice/project/src"` +scmProvider | True when a source control provider is active. +scmResourceGroup | True when the source control resource group context matches. +originalResourceScheme | True when the original resource URI scheme matches. `resourcePath` | True when the Explorer or editor's resource absolute path matches.
Example: `"resourcePath == /users/alice/project/gulpfile.js"` `resourceLangId` | True when the Explorer or editor title [language ID](/docs/languages/identifiers) matches.
Example: `"resourceLangId == markdown"` `isFileSystemResource` | True when the Explorer or editor file is a file system resource that can be handled from a file system provider. @@ -227,8 +230,15 @@ Context name | True when `view` | For `view/title` and `view/item/context`, the view to display the command in.
Example: `"view == myViewsExplorerID"`. `viewItem` | For `view/item/context`, the `contextValue` from the tree item.
Example: `"viewItem == someContextValue"`. `webviewId` | For `webview/context`, the webview ID to display the command in.
Example: `"webviewId == catCoding"`. +virtualWorkspace | True when the current workspace is a virtual workspace. +isWorkspaceTrusted | True when the current workspace is trusted. +webviewSection | For `webview/context`, the webview section to display the command in. + `isFullscreen` | True when window is in fullscreen. `focusedView` | The identifier of the currently focused view. +testId | True when the testing item ID matches. +controllerId | True when the testing controller ID matches. +testItemHasUri | True when the testing item has an associated URI. `canNavigateBack` | True if it is possible to navigate back. `canNavigateForward` | True if it is possible to navigate forward. `canNavigateToLastEditLocation` | True if it is possible to navigate to the last edit location.