Recently, I've started working on Smardec's IdeaMouseGestures plugin. For those who don't know this plugin, basically what it does is enable the user to map some mouse gestures to specific actions within IntelliJ IDEA.
The technique formerly used to list the available actions was to dynamically discover them by "looking" at the menu items of IDEA's main menu bar.
Then, upon a recognised mouse gesture, those actions were (and still are) triggered by a doClick on the corresponding menu item.
What I did to populate the action tree was to use the ActionManager and have recursively give me the available AnAction instances starting from IdeaActions.GROUP_MAIN_MENU.
What I would like to do now is be able to trigger those AnActions programatically by calling their actionPerformed method, in order to avoid having to use the MenuItem.doClick() trick. The problem is that I don't really know what to put in the AnActionEvent instance I have to pass as parameter. So far, my attempts have failed.
Thanks in advance for any help.