package scripts;
import parsers.GeneralParser;
/**
*
* The thread which handle the JavaNCSS, CLOC, and PMD /CPD parsers
*
*/
public class GeneralParserThread extends Thread {
private String clocLanguage;
private String jncssPath;
private String pmdPath;
private String clocPath;
private int idVersion;
public GeneralParserThread(String jncssPath, String pmdPath,
String clocPath, String colcLanguage, int idVersion) {
this.jncssPath = jncssPath;
this.pmdPath = pmdPath;
this.clocPath = clocPath;
this.clocLanguage = colcLanguage;
this.idVersion = idVersion;
}
public void run() {
GeneralParser generalParser = new GeneralParser(jncssPath, pmdPath,
clocPath, clocLanguage);
try {
generalParser.parseResults();
generalParser.saveResults(idVersion);
} catch (InterruptedException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}