Custom menu/context menu in plugin

Can I create custom menu / context menu entries in a plugin? VSCode has this capability in a declarative way in the package.json:

[original thread by Ido Perez]

Hello Ido, menus contribution point is supported but with several restrictions

the menu actions can be added to three menus (locations):

  • editor/context

  • explorer/context

  • view/item/context

And the following contexts can be used with when expressions:

  • view and viewItem - global UI contexts

  • config.* - preferences contexts evaluated to a boolean value