我有一个位于视图容器中的奇异视图,我希望有一个标题包含它们。例如,此视图的默认位置在面板中,但是当移动到另一个视图容器中的活动栏时,标题显示为[视图容器标题]:[view title]。虽然这很有意义,但最好将我的视图显示为[视图或视图容器标题],而没有结肠期望第二部分。 VSCODE标准视图(例如问题,输出,调试控制台)展示了通缉行为。当放置在另一个容器中时,它们只是显示为“输出”或“问题”,而不是诸如“面板:输出”之类的东西。是否可以拥有一个没有结肠/第二部分的单个标题?谢谢。
I have a singular view residing in a view container, and I wish to have one title encompassing them. For instance, this view's default position is in the panel, but when moved to the activity bar in another view container, the title is displayed as [view container title]:[view title]. While this makes sense, it would be nice to display my view as [view or view container title], without a colon expecting a second part. The VSCode standard views like Problems, Output, Debug Console exhibit the wanted behavior. They just display as "Output" or "Problems" when placed in another container, rather than something like "Panel:Output". Is it possible to have a single title with no colon/second part? Thanks.
发布评论
评论(1)
您可以尝试使用视图的
contextualtitle
属性。根据发布时的文档,它应该满足您的需求:从那时起,我不确定他们是否更新了API或更新了行为,但是,如果没有,您可能会在尝试使用它时遇到的相同问题。我什至为VS代码团队打开了问题( https://githbithub.com/microsoft/microsoft/vscscode /eskoes/102447 ),但他们将问题标记为设计,我放弃了使用它。
希望这会有所帮助
You may try to use the
contextualTitle
property of the view. Based on its documentation when launched, it should fit your needs:https://code.visualstudio.com/updates/v1_46#_flexible-layout
I'm not sure they updated the API or updated the behavior since then but, if not, you will probably face the same issue I had while trying to use it. I even opened an issue to the VS Code team (https://github.com/microsoft/vscode/issues/102447), but they marked the issue as designed and I gave up on using it.
Hope this helps