How to Put a Custom Widget into a Custom Menu #9622
Answered
by
vince-fugnitto
sboudreaux96
asked this question in
Q&A
-
Hello - I have a custom menu item I created next to File, Edit, etc. (it is just like sample-menu from the api-samples) and I wanted to know how I would go about adding my custom widget to that custom menu? |
Beta Was this translation helpful? Give feedback.
Answered by
vince-fugnitto
Jun 21, 2021
Replies: 1 comment 3 replies
-
@sboudreaux96 use the API to register menus (https://eclipse-theia.github.io/theia/docs/next/classes/core.menumodelregistry-1.html) like in the example: You can create a command that simply opens your view when executed, and add it to your custom menu. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
vince-fugnitto
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@sboudreaux96 use the API to register menus (https://eclipse-theia.github.io/theia/docs/next/classes/core.menumodelregistry-1.html) like in the example:
theia/examples/api-samples/src/browser/menu/sample-menu-contribution.ts
Lines 48 to 73 in 6afae9e