private void addRecentExample ( final String text , final ExampleData data , final boolean select ) { WMenuItem item = new WMenuItem ( text , new SelectExampleAction ( ) ) ; item . setCancel ( true ) ; menu . add ( item ) ; item . setActionObject ( data ) ; if ( select ) { menu . setSelectedMenuItem ( item ) ; } }
Adds an example to the recent subMenu .