protected String getTaskHelp ( String desc , String usage , String optionKeyPrefix , String optionDescPrefix , String addonKey , String footer , Object ... args ) { StringBuilder scriptHelp = new StringBuilder ( ) ; scriptHelp . append ( NL ) ; scriptHelp . append ( getOption ( "global.description" ) ) ; scriptHelp . append ( NL ) ; scriptHelp . append ( getOption ( desc ) ) ; scriptHelp . append ( NL ) ; // print a empty line scriptHelp . append ( NL ) ; scriptHelp . append ( getOption ( "global.usage" ) ) ; scriptHelp . append ( NL ) ; scriptHelp . append ( getOption ( usage ) ) ; scriptHelp . append ( NL ) ; String options = buildScriptOptions ( optionKeyPrefix , optionDescPrefix ) ; if ( ! options . isEmpty ( ) ) { // print a empty line scriptHelp . append ( NL ) ; scriptHelp . append ( getOption ( "global.options" ) ) ; scriptHelp . append ( options ) ; } if ( addonKey != null && ! addonKey . isEmpty ( ) ) { // print a empty line scriptHelp . append ( NL ) ; scriptHelp . append ( getOption ( addonKey ) ) ; } if ( footer != null && ! footer . isEmpty ( ) ) { scriptHelp . append ( footer ) ; } scriptHelp . append ( NL ) ; if ( args . length == 0 ) { return scriptHelp . toString ( ) ; } else { return MessageFormat . format ( scriptHelp . toString ( ) , args ) ; } }
Generate the formatted task help .