private void updateRecentMenu ( ) { menu . removeAllMenuItems ( ) ; int index = 1 ; boolean first = true ; for ( Iterator < ExampleData > i = recent . iterator ( ) ; i . hasNext ( ) ; ) { ExampleData data = i . next ( ) ; try { StringBuilder builder = new StringBuilder ( Integer . toString ( index ++ ) ) . append ( ". " ) ; if ( data . getExampleGroupName ( ) != null ) { builder . append ( data . getExampleGroupName ( ) ) . append ( " - " ) ; } builder . append ( data . getExampleName ( ) ) ; addRecentExample ( builder . toString ( ) , data , first ) ; first = false ; } catch ( Exception e ) { i . remove ( ) ; LogFactory . getLog ( getClass ( ) ) . error ( "Unable to read recent class: " + data . getExampleName ( ) ) ; } } }
Updates the entries in the Recent sub - menu .