I hadn't really thought of the possibilities for the contextual menu, I really thought of it for choosing a list of snippets to insert after a selection. If it could run commands as well, that would be very cool.
XML sounds like a good way of generating the list, I don't use it that much, but couldn't each 'menu item' have 'input', 'output' and 'action' children to define what it should do?
Would it be possible for you to make a menu that just had a list of snippets at the moment, which could be further expanded in the future? I look forward to any progress in this regard.
Keep up the great work, Max