示例#1
0
 static void gen() {
   if (templateRoot == null) {
     throw new RuntimeException("the template root directory must be set");
   } else {
     try {
       gen(templateRoot);
     } catch (IOException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
     }
   }
 }
示例#2
0
  /**
   * The entry point for the command line tool japid.bat and japid.sh
   *
   * <p>The "gen" and "regen" are probably the most useful ones.
   *
   * @param args
   * @throws IOException
   */
  public static void main(String[] args) throws IOException {
    if (args.length > 0) {
      String arg0 = args[0];

      setTemplateRoot(".");
      if ("gen".equals(arg0)) {
        gen(templateRoot);
      } else if ("regen".equals(arg0)) {
        regen(templateRoot);
      } else if ("clean".equals(arg0)) {
        delAllGeneratedJava(getJapidviewsDir(templateRoot));
      } else if ("mkdir".equals(arg0)) {
        mkdir(templateRoot);
      } else if ("changed".equals(arg0)) {
        changed(japidviews);
      } else {
        System.err.println("help:  optionas are: gen, regen, mkdir and clean");
      }
    } else {
      System.err.println("help:  optionas are: gen, regen, mkdir and clean");
    }
  }
示例#3
0
 public static void regen(String root) throws IOException {
   delAllGeneratedJava(getJapidviewsDir(root));
   gen(root);
 }