private void createMenus ( Collection < ActionRef > parents , Collection < ActionRef > actions ) { for ( final ActionRef action : actions ) { final Featurable menu = createMenu ( action ) ; if ( ! action . getRefs ( ) . isEmpty ( ) ) { generateSubMenu ( actions , action , menu ) ; } else if ( action . hasCancel ( ) ) { previous . put ( action , parents ) ; generateCancel ( action , menu ) ; } } for ( final Featurable current : menus ) { handler . add ( current ) ; } }
Create menus from actions .