protected List< IFlexViolation > processFile( final String resourcePath ) throws IOException,
TokenException
{
if ( !getIgnoreFiles().contains( resourcePath ) )
{
final IAS3Parser parser = new AS3Parser();
final IFlexFile file = getTestFiles().get( resourcePath );
IPackage rootNode = null;
if ( file == null )
{
throw new IOException( resourcePath
+ " is not found" );
}
if ( file instanceof IAs3File )
{
rootNode = NodeFactory.createPackage( parser.buildAst( file.getFilePath() ) );
}
else
{
rootNode = NodeFactory.createPackage( parser.buildAst( file.getFilePath(),
( ( IMxmlFile ) file ).getScriptBlock() ) );
}
return getRule().processFile( file,
rootNode,
getTestFiles() );