Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Activate extension when some Truffle views are collapsed #258

Open
acuarica opened this issue Nov 14, 2022 · 1 comment
Open

Activate extension when some Truffle views are collapsed #258

acuarica opened this issue Nov 14, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request needs investigated

Comments

@acuarica
Copy link
Contributor

The extension does not get activated when the Truffle activity bar is visible but the Networks view is collapsed. This gives the impression that there is not a Truffle workspace open in the Contract Explorer. See example below.

truffle-sample-project-1668441994330

Steps to reproduce

  1. Make sure all views under the Truffle activity bar are collapsed
  2. Open a Truffle workspace
  3. Switch to the Truffle activity bar
  4. Opening any view but Networks view does not activate the extension

Expected behavior

The extension should be activated whenever the Truffle activity bar is visible, regardless of the Networks view is collapsed or not.

@acuarica acuarica added the enhancement New feature or request label Nov 14, 2022
@acuarica acuarica self-assigned this Dec 20, 2022
@acuarica
Copy link
Contributor Author

It seems that this is no longer the case after the release of VS Code 1.74.0. From https://code.visualstudio.com/updates/v1_74#_implicit-activation-events-for-declared-extension-contributions

Previously, if an extension declared that it contributed a command mycommand in its package.json file, it also needed to list the corresponding onCommand:mycommand activation event in the activationEvents field of package.json for the command to successfully execute. This was tedious and error-prone and could lead to large package.json files.

VS Code will now automatically populate activation events for the following extension contribution points:

As mentioned in the article above, this works for views too, so there is no need to explicit declare the activationEvents:onView.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request needs investigated
Projects
None yet
Development

No branches or pull requests

1 participant