Last active
January 24, 2020 07:07
-
-
Save sketchbuch/07a0b87ec57a50f9898f0579f721998e to your computer and use it in GitHub Desktop.
VSC - An example of how to control visibility of a view container's views in a VSC Extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Update the value used by a view's "when" condition | |
// Can't use in getChildren() | |
vscode.commands.executeCommand('setContext', someContextVar, isVisibleBoolean); | |
// Package.json | |
/* | |
... | |
"views": { | |
"viewsContainerId": [ | |
{ | |
"id": "some-view", | |
"name": "A view", | |
"when": "someContextVar" | |
}, | |
}, | |
... | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment