We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in
Refs: #97544
Complexity: 4
Create Issue
Create a simple extension that optionally shows a command depending on if 1 context key's value exists in another context key's value.
vscode.executeCommand('setContext', 'supportedFolders', [ 'test', 'foo', 'bar' ]); // or vscode.executeCommand('setContext', 'supportedFileExtensions', { 'test': true, 'foo': 'anything', 'bar': false });
NOTE: in the object case, the value doesn't matter, as it is just the existence of the key on the object
"menus": { "explorer/context": [ { "command": "ext.showOnlyOnCertainFolders", "when": "explorerResourceIsFolder && resourceFilename in supportedFolders" } ] }
vscode.executeCommand('setContext', 'supportedFileExtensions', [ '.js', '.ts' ]); // or vscode.executeCommand('setContext', 'supportedFileExtensions', { '.js': true, '.ts': 'anything' });
"menus": { "explorer/context": [ { "command": "ext.showOnlyOnCertainFiles", "when": "!explorerResourceIsFolder && resourceExtname in supportedFileExtensions" } ] }
The text was updated successfully, but these errors were encountered:
Pretty cool 👍
Sorry, something went wrong.
No branches or pull requests
Refs: #97544
Complexity: 4
Create Issue
Create a simple extension that optionally shows a command depending on if 1 context key's value exists in another context key's value.
Example 1
Example 2
The text was updated successfully, but these errors were encountered: