Add contextMenu item in general plugin

Hi is possible to add an item to the right click menu in General Plugin?

I want to add an item that can be toggled like:


In the past in a Reporter Plugin I used conditionalContextMenus but didn’t worked for me this time.

Any reference or help is appreciated.


You need to add any callback (that you most likely already have) and then implement:

- (void)addMenuItemsForEvent:(NSEvent *)theEvent controller:(NSViewController<GSGlyphEditViewControllerProtocol>*)controller toMenu:(NSMenu *)theMenu;


def addMenuItemsForEvent_controller_toMenu_(theEvent, controller, theMenu)