菜單
擴展是通過配置擴展點
來註冊的,一般要關聯一個命令
。擴展方式是在package.json中contributes
節點下增加menus
擴展點。相關代碼如下:
"contributes": {
"menus": {
"editor/context": [
{
"command": "extension.helloWorld",
"group": "z_commands",
"when": "editorTextFocus"
},
{
"group": "z_commands"
}
]
}
}
菜單
擴展點詳細的說明請參考這裏menus