How to add a right-click menu in an extension?

I try to make an extension in java and I wonder whether it is possible to add a right-click popup menu in an Addon.xcu file?

LO allows customization of menus with tools->customize but I cannot get it to work with extension commands from a xcu file. Is that a bug?