Add custom command to own VS Code extention in "view/title"

Viewed 25

I'm trying to add my own command in a Visual Studio Code extension in the upper "view/title" row. For example, like the built-in "Extension"-View: example

I couldn't figure out from the menu-contributions API how this works. I specified a custom ViewContainer in the package.json, which in turn contains multiple views:

{
  "viewsContainers": {
    "activitybar": [
      {
        "id": "my-view",
        "title": "My View",
        "icon": "media/logo.png"
      }
    ]
  },
  "views": {
    "my-view": [
      {
        "id": "profiles",
        "name": "Profiles"
      },
      {
        "id": "templates",
        "name": "Templates"
      }
    ]
  }
}

Since I have a command that goes across all views, I would like to have the button at the height of the ViewsContainer (as in the image). Is that possible?

0 Answers
Related