【发布时间】:2021-05-25 08:02:09
【问题描述】:
我正在编写一个 VSCode 扩展,它有一个添加了 WebviewView 的视图容器。
"contributes": {
"commands": [
{
"command": "showView",
"title": "Show view"
}
],
"viewsContainers": {
"panel": [
{
"id": "mycontainer",
"title": "My Container",
"icon": "media/app.svg"
}
]
},
"views": {
"mycontainer": [
{
"type": "webview",
"id": "myview",
"name": "MyView"
}
]
}
},
在showView 命令实现中。我想以编程方式使视图 myview 显示在 VSCode UI 中。该怎么做?
【问题讨论】:
-
如果没有公共 API 来显示 ViewContainer 和/或将焦点放在容器中的视图上,您可能会在 github 上提交功能请求,也很高兴找出视图在哪个容器/面板中目前是
标签: visual-studio-code vscode-extensions