private void scanFile(IFile file) {
try {
IParser parser=null;
if (file.getName().endsWith(".v")){
// VerilogParserReader handles verilog compiler directive
ParserReader reader = new VerilogParserReader(file.getContents(), file);
parser = ParserFactory.createVerilogParser(reader, m_Project,
file);
} else if (file.getName().endsWith(".vhd")){
ParserReader reader = new ParserReader(file.getContents());
parser = ParserFactory.createVhdlParser(reader, m_Project, file);