diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-04-28 20:21:06 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-04-28 20:21:06 +0200 |
commit | 5e588f06a2e53fcc6fad03081b5a6821cebe3ed1 (patch) | |
tree | 351410d10662e1230060b0a834f582daa2d33a9f /skeletons | |
parent | 778f56b6453ab60d69773d9c89e82820d35f049f (diff) | |
download | vim-5e588f06a2e53fcc6fad03081b5a6821cebe3ed1.zip vim-5e588f06a2e53fcc6fad03081b5a6821cebe3ed1.tar.gz |
cleanup java.erb skeleton
Diffstat (limited to 'skeletons')
-rw-r--r-- | skeletons/java.erb | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/skeletons/java.erb b/skeletons/java.erb index 51ac106..f0ec54a 100644 --- a/skeletons/java.erb +++ b/skeletons/java.erb @@ -12,21 +12,23 @@ import jargs.gnu.CmdLineParser; * @author <% @username %> <<%= @email %>> * @date <%= @now %> */ - public class <%= @class_name %> { +public class <%= @class_name %> { - /* - * print usage and exit with status 1 - */ - private static void printUsage () { - System.err.println("Usage : <%= @class_name %> [{-d, --debug} a_float] [ --input file_name]"); - System.err.println(" debug : debug verbosity"); - System.err.println(" input : path to input file"); - } + /* + * print usage and exit with status 1 + */ + private static void printUsage() + { + System.err.println("Usage : <%= @class_name %> [{-d, --debug} a_float] [ --input file_name]"); + System.err.println(" debug : debug verbosity"); + System.err.println(" input : path to input file"); + } - /** - * application entry point - */ - public static void main (String [] args ) { + /** + * application entry point + */ + public static void main(String [] args ) + { CmdLineParser parser = new CmdLineParser(); CmdLineParser.Option debug = parser.addIntegerOption('d',"debug"); @@ -34,23 +36,23 @@ import jargs.gnu.CmdLineParser; try { parser.parse(args); - } catch(CmdLineParser.OptionException e) { + } catch (CmdLineParser.OptionException e) { System.err.println("\n"+e.getMessage()); printUsage(); - System.exit(2); + System.exit(2); } int debugLevel = ((Integer)parser.getOptionValue(debug,new Integer(0))).intValue(); String inputFile = (String)parser.getOptionValue(input); - if(debugLevel>0){ + if (debugLevel>0) { System.out.println("Debug Trace :"); System.out.println("\t"+new Date( ) ); System.out.println("\tdebug level : "+debugLevel); System.out.println("\texcel file : "+inputFile); } - if(inputFile!=null && !inputFile.equals("")){ + if (inputFile!=null && !inputFile.equals("")) { File f = new File(inputFile); if(!f.canRead()){ System.err.println("Fatal Error : Unable to read "+inputFile); |