How to make a checkable menu item



Browsing!/api to understand how to work in the menus.
I would like to create a panel for a plugin and add a menu item to enable it in the Window menu.
I found menus.addItemByPath but I believe that’s not the method used to create a checkable menu item.
Which method do I use for this case ?

In general, where can I find examples of plugins, in order to understand the logic in them ? ( I browse c9/core on GitHub in order to find the js file responsible of building the top menus, but haven’t found yet)


addItemByPath is the right api, you only need to set type=check on menuitem options
note that all panels are added to view menu automatically, so there is no need to add them to window menu too

If you are asking this for "TODO"s panel: keep in mind the code we need to refactor might be a good place to start


Thank you for your help.
Yes, it is for this TODO panel plugin. I already have a good idea on how it will work, but since it is my first plugin, I’m a bit unfamiliar with the SDK.
By the way, the API documentation is clear and the examples are pretty self-explanatory. :slight_smile: