Skip to content

Commit ffc1787

Browse files
authored
Merge pull request #7788 from DehanLUO/update-activation-events-note
Update Extension Anatomy with activation events note
2 parents 25f3df4 + 37e4fa5 commit ffc1787

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

api/get-started/extension-anatomy.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ In the last topic, you were able to get a basic extension running. How does it w
1414
The `Hello World` extension does 3 things:
1515

1616
- Registers the [`onCommand`](/api/references/activation-events#onCommand) [**Activation Event**](/api/references/activation-events): `onCommand:helloworld.helloWorld`, so the extension becomes activated when user runs the `Hello World` command.
17+
> **Note:** Starting with [VS Code 1.74.0](https://code.visualstudio.com/updates/v1_74#_implicit-activation-events-for-declared-extension-contributions), commands declared in the `commands` section of `package.json` automatically activate the extension when invoked, without requiring an explicit `onCommand` entry in `activationEvents`.
1718
- Uses the [`contributes.commands`](/api/references/contribution-points#contributes.commands) [**Contribution Point**](/api/references/contribution-points) to make the command `Hello World` available in the Command Palette, and bind it to a command ID `helloworld.helloWorld`.
1819
- Uses the [`commands.registerCommand`](/api/references/vscode-api#commands.registerCommand) [**VS Code API**](/api/references/vscode-api) to bind a function to the registered command ID `helloworld.helloWorld`.
1920

0 commit comments

Comments
 (0)