title: Command on TreeViewItem item click, VSCode Extension
body: <p>Context: a question related to building a clickable edit button on any item of a TreeView. </p>
  
  <p>How can I call a callback function when the edit button in front of a  TreeViewItem is clicked?</p>
  
  <p>Image of the edit button:
  <a href="https://code.visualstudio.com/api/extension-guides/tree-view#view-actions" rel="nofollow noreferrer">https://code.visualstudio.com/api/extension-guides/tree-view#view-actions</a></p>
  
  <p>I noticed the <code>command</code> property on the TreeItem instance and went through the docs but couldn't understand how to call a callback function with the command.</p>
  
  <p>Any help would be appreciated.
  Thanks</p>
  
  <p>Docs:  <a href="https://code.visualstudio.com/docs/extensionAPI/vscode-api#TreeItem" rel="nofollow noreferrer">https://code.visualstudio.com/docs/extensionAPI/vscode-api#TreeItem</a></p>
  
  <pre><code>            "view/item/context": [
                  {
                      "command": "issuesList.deleteEntry",
                      "when": "view == issuesList &amp;&amp; viewItem == dependency",
                      "group": "inline"
                  },
                  {
                      "command": "issuesList.viewInVisualizer",
                      "when": "view == issuesList &amp;&amp; viewItem == dependency"
                  }
              ]
  </code></pre>