You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have come across the when property for KeyBindings & Menus in the Contribution points in the package.json file of my extension, but I would love to be able to based inside some logic of my extension to enable/disable showing & hiding certain menu options.
I could achieve this with a configuration but this seems wrong & a bit hacky for my situation, as I would not want the user to configure this value.
"configuration": {
"type": "object",
"title": "IIS Express Settings",
"properties": {
"iisexpress.serverRunning": {
"type": "boolean",
"default": false,
"description": "This property is not to be set or used in settings.config its just used to display the correct menu items if the server is running or not"
}
}
}
So in my extension I could update the config value when IIS Express Server is running so that the Restart & Stop Server commands are only visible in the menu & keyboard bindings etc.
Can I suggest some form of API to allow the when property to work with some developer defined boolean that could be toggled from the extension developers codebase
The text was updated successfully, but these errors were encountered:
I have come across the when property for KeyBindings & Menus in the Contribution points in the package.json file of my extension, but I would love to be able to based inside some logic of my extension to enable/disable showing & hiding certain menu options.
https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts
I could achieve this with a configuration but this seems wrong & a bit hacky for my situation, as I would not want the user to configure this value.
So in my extension I could update the config value when IIS Express Server is running so that the Restart & Stop Server commands are only visible in the menu & keyboard bindings etc.
Can I suggest some form of API to allow the
when
property to work with some developer defined boolean that could be toggled from the extension developers codebaseThe text was updated successfully, but these errors were encountered: