private void chooseBootstrapPack ( BufferedReader br ) throws IOException { while ( true ) { printInstruction ( "Choose the type of application you want to generate:" ) ; for ( int i = 0 ; i < getBootstrapPacksInfo ( ) . size ( ) ; i ++ ) { TemplatePackInfo templatePackInfo = getBootstrapPacksInfo ( ) . get ( i ) ; System . out . println ( " " + ( i + 1 ) + ") " + templatePackInfo . getName ( ) ) ; System . out . println ( " " + templatePackInfo . getProjectLink ( ) ) ; System . out . println ( " " + templatePackInfo . getDescription ( ) ) ; if ( templatePackInfo . getDescription2 ( ) != null ) { System . out . println ( " " + templatePackInfo . getDescription2 ( ) ) ; } System . out . println ( "" ) ; } String choice = br . readLine ( ) ; if ( isBlank ( choice ) ) { continue ; } else { try { TemplatePackInfo chosenTemplatePackInfo = getBootstrapPacksInfo ( ) . get ( Integer . parseInt ( choice ) - 1 ) ; bootstrapPackName = chosenTemplatePackInfo . getName ( ) ; System . out . println ( "OK, using: " + chosenTemplatePackInfo . getName ( ) ) ; packCommand = chosenTemplatePackInfo . getCommand ( ) ; packCommandHelp = chosenTemplatePackInfo . getCommandHelp ( ) ; } catch ( Exception e ) { System . out . println ( "" ) ; continue ; } } break ; } }
Interactively ask the user which pack should be used .