admin管理员组文章数量:1290179
package.json
"ICA.config.jiraEnable": {
"type": "boolean",
"markdownDescription": "Enable or disable JIRA configuration settings.",
"description": "Enable JIRA Configuration.",
"default": false,
"order": 3
},
"ICA.config.jiraBaseUrl": {
"type": "string",
"markdownDescription": "JIRA Base URL.",
"description": "JIRA Base URL.",
"default": "jsw",
"order": 4
},
"ICA.config.jiraApiVersion": {
"type": "integer",
"markdownDescription": "JIRA API Version.",
"description": "JIRA API Version.",
"default": 2,
"order": 5
},
"ICA.config.jiraToken": {
"type": "string",
"markdownDescription": "JIRA API Token.",
"description": "JIRA API Token.",
"order": 6
}
With respect to jiraEnable
property jiraBaseUrl
, jiraToken
& jiraApiVersion
should be disable/enable
or appear/disappear
I have used the below code but no use
"ICA.config.jiraEnable": {
...
},
"ICA.config.jiraBaseUrl": {
...,
"when": "ICA.config.jiraEnable"
},
"ICA.config.jiraApiVersion": {
...,
"when": "ICA.config.jiraEnable"
},
"ICA.config.jiraToken": {
...,
"when": "ICA.config.jiraEnable"
}
package.json
"ICA.config.jiraEnable": {
"type": "boolean",
"markdownDescription": "Enable or disable JIRA configuration settings.",
"description": "Enable JIRA Configuration.",
"default": false,
"order": 3
},
"ICA.config.jiraBaseUrl": {
"type": "string",
"markdownDescription": "JIRA Base URL.",
"description": "JIRA Base URL.",
"default": "jsw.com",
"order": 4
},
"ICA.config.jiraApiVersion": {
"type": "integer",
"markdownDescription": "JIRA API Version.",
"description": "JIRA API Version.",
"default": 2,
"order": 5
},
"ICA.config.jiraToken": {
"type": "string",
"markdownDescription": "JIRA API Token.",
"description": "JIRA API Token.",
"order": 6
}
With respect to jiraEnable
property jiraBaseUrl
, jiraToken
& jiraApiVersion
should be disable/enable
or appear/disappear
I have used the below code but no use
"ICA.config.jiraEnable": {
...
},
"ICA.config.jiraBaseUrl": {
...,
"when": "ICA.config.jiraEnable"
},
"ICA.config.jiraApiVersion": {
...,
"when": "ICA.config.jiraEnable"
},
"ICA.config.jiraToken": {
...,
"when": "ICA.config.jiraEnable"
}
Share
Improve this question
edited Jan 29 at 11:58
Souvik Pal
asked Jan 24 at 10:05
Souvik PalSouvik Pal
631 gold badge1 silver badge6 bronze badges
5
|
1 Answer
Reset to default 1This kind of constraint is not currently supported in VS Code. So, you won’t be able to enable/disable settings based on other setting value.
Based on the Contribution Points configuration, you will see that neither when
nor enablement
are supported.
I did a quick search in the VS Code repo (https://github.com/microsoft/vscode/issues?q=is%3Aissue%20state%3Aopen%20when%20label%3Asettings-editor%20), but didn’t find a similar request so, I would suggest you to open a new issue in the VS Code repo, and ask for such improvement in the Settings Editor.
本文标签:
版权声明:本文标题:visual studio code - How to make a few VSCode Extension settings disable when a particular checkbox is not checked - Stack Overf 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738430880a2086395.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
when
a valid property for configuration settings? If so you need to create a context variable in your code that copies theICA.config.jiraEnable
variable, you can use anisConfigurationChange
callback – rioV8 Commented Jan 26 at 7:03vscode.commands.executeCommand("setContext", "ICA.config.jiraEnable", jiraEnable);
insideisConfigurationChange
still the settings is visible. Any other alternative we have? – Souvik Pal Commented Jan 28 at 10:27*.config.*
– rioV8 Commented Jan 28 at 14:48when
is supported in package.json settings configurations. I tried asetContext
and used it in awhen
clause and it had no effect. – Mark Commented Jan 29 at 0:41