Examples of OORexxParser


Examples of org.oorexx.parser.OORexxParser

    if(xml != null){
     
      out("Using configuration from " + (xmlConfiguration == null ? "input parameters" : xmlConfiguration) + ".", false);
     
      xml = xml.trim();
      OORexxParser ooRexxParser = null;
      DocGenerator docGenerator = null;
      try{
        OORexxDocXMLParser docXMLParser = new OORexxDocXMLParser(xml);
     
        ooRexxParser = docXMLParser.getParser();
        docGenerator = docXMLParser.getGenerator();
      }catch(NullPointerException ex){
        out((xmlConfiguration != null ? "Some values are missing or invalid! Please check out the configuration file: " +
             xmlConfiguration : "Some paramaters are missing or invalid! Please pass all required parameters!"), true);
      }
       
      List<File> srcfiles = ooRexxParser.getContentHolder().getFiles();
     
      if(srcfiles == null || srcfiles.size() == 0){
        out("Cannot parse given input directory/file." + (xmlConfiguration != null ? "Please check the configuration file: "+ xmlConfiguration + "!" : "Please check the input parameter!"), true);
      }
     
      for(File file: srcfiles)
        if(!file.exists())
          out("Input " + (file.isDirectory() ? "directory" : "file") + " does not exist!\n" + (xmlConfiguration != null ? "Please check the configuration file: "+ xmlConfiguration + "!" : "Please check the input parameter!"), true);
     
      if(docGenerator.getDestFile().isFile())
        out("Output parameters has to be a directory! " + docGenerator.getDestFile().getAbsolutePath(), true);
     
     
      new Thread(new Runnable() {
       
       
       
        public void run() {
         
          Calendar cal = Calendar.getInstance();
            cal.setTime(new Date(0));
          cal.set(Calendar.HOUR_OF_DAY, 0);
          cal.set(Calendar.MINUTE, 0);
          cal.set(Calendar.SECOND, 0);
          cal.set(Calendar.MILLISECOND, 0);
         
          long time = cal.getTimeInMillis();
         
          SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
         
          while(!OORexxParser.stopStateThread){
            Date dTime = new Date(time);
            out(OORexxParser.state + " Time elapsed: " + dateFormat.format(dTime), false);
           
            try {
              Thread.sleep(1000l);
            } catch (InterruptedException e) {
              e.printStackTrace();
            }
           
            time += 1000l;
          }
         
          OORexxParser.stopStateThread = false;
          OORexxParser.state = "";
        }
      }).start();
     
      List<OORexxPackage> packages = ooRexxParser.parse();
     
      out("Generating files to " + docGenerator.getDestFile().getAbsolutePath(), false);
      docGenerator.generate(packages);
     
      out("Finished!", false);
View Full Code Here

Examples of org.oorexx.parser.OORexxParser

    log = Logger.getLogger(OORexxDocXMLParser.class);

    this.xml = xml;
    try {
      parse();
      parser = new OORexxParser(contentHolder);
      generator = new DocGenerator(destFile, overview, title, headerData);
      generator.setSrcFileScopes(srcFiles);
    } catch (Exception e) {
      e.printStackTrace();
      log.error("Could not parse given xml");
View Full Code Here

Examples of org.oorexx.parser.OORexxParser

    log = Logger.getLogger(OORexxDocXMLParser.class);
   
    this.xml = xml;
    try {
      parse();   
      parser = new OORexxParser(contentHolder);
      generator = new DocGenerator(destFile, overview, title, headerData);
        generator.setSrcFileScopes(srcFiles);
    } catch (Exception e) {
      e.printStackTrace();
      log.error("Could not parse given xml");
View Full Code Here

Examples of org.oorexx.parser.OORexxParser

   
    xml = xml.trim();
   
    OORexxDocXMLParser docXMLParser = new OORexxDocXMLParser(xml);
   
    OORexxParser ooRexxParser = docXMLParser.getParser();
    DocGenerator docGenerator = docXMLParser.getGenerator();
      docGenerator.generate(ooRexxParser.parse());

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.