I trying to write a plugin to printout all the JMenuItems display in JMenuBar of Intellij's frame.
under there are items under File menu, like New Project, Open Project, New Module etc, I want to obtain all these subMenu and MenuItem from the the menubar for manipulation.
However after using
JFrame _win = (JFrame)WindowManager.getInstance().suggestParentWindow(null); // Obtain the frame reference
and getting the Jmenubar, I have found that only the top level menus (File, Edit , Search, View, Goto, Code, Analyze, Refactor etc) can be obtained but not their menuitems and submenu.
So what is the API and steps to obtain those JMenu and JMenuItem references ?