Package qat.parser

Examples of qat.parser.ParserInterface


    endTime = startTime;

    TestFinderInterface testFinder = new GenericTestFinder(parent.getProperties());
    testFinder.setProjectRoot(rootDirectory);

    ParserInterface parser;

    for(int i = 0; ((i < runList.size())&&(running)); i++) {
      runProgress = i;
      test = (TestSpecification)runList.get(i);
      parser = testFinder.getParser(new File(test.getTestSpecPath()));
      if (parser==null) {
        System.out.println("No test finder registered for "+test.getTestSpecPath());
      }
      else {
        parser.prepare(parent.getProjectResultsDirectory());
        parser.setStatusLabel(parent.getParserStatusLabel());
        test.clearTraceFiles(parent.getProjectResultsDirectory());
        test.setStatus(ProtocolConstants.RUNNING);
        parent.updateTest(test,inEvaluationMode());
        if (inEvaluationMode()) {
          parent.updateStatus(Resources.getString("startParse")+" "+test.getTestName(),1);
          test.parseTest(parent.getProjectResultsDirectory(),
              parent.getProperties(),
              parser);
        }
        else {
          parent.updateStatus(Resources.getString("running")+" "+test.getTestName(),1);
          test.runTest(parent.getProjectResultsDirectory(),
              parent.getProperties(),
              parser);
        }
        endTime = new Date();
        parent.updateTest(test,inEvaluationMode());
        parser.finish();
      }
    }

    if (running) {
      parent.updateStatus(Resources.getString("done"),0);
View Full Code Here


          thisRoot.add(newRoot);
          loadTestDir(newRoot,node.getPath(), testFinder, status);
        }
        else {
          if (testFinder.isTestFile(node)) {
            ParserInterface parser = testFinder.getParser(node);
            parser.prepare(getParentQAT().getProjectResultsDirectory());
            addFileNode(thisRoot,dirPath+File.separator+node.getName(), parser);
            parser.finish();
          }
        }
      }
    }
    // don't add any empty directories, only those containing qat files, or
View Full Code Here

  }
  return false;
    }

    public ParserInterface getParser(File file) {
  ParserInterface parser;
  for (int i = 0; i < testFinders.size(); i++) {
      if ((parser=((TestFinderInterface)testFinders.get(i)).getParser(file))!=null) {
    parser.setProperties(getProperties());
    return parser;
      }
  }
  return null;
    }
View Full Code Here

    }
    return false;
  }

  public ParserInterface getParser(File file) {
    ParserInterface parser;
    for (int i = 0; i < testFinders.size(); i++) {
      if ((parser=((TestFinderInterface)testFinders.get(i)).getParser(file))!=null) {
        try {
          parser.setTestPath(file.getCanonicalPath());
        } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
        parser.setProperties(getProperties());
        return parser;
      }
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of qat.parser.ParserInterface

Copyright © 2018 www.massapicom. 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.