}
}
// iterate and compile
for ( final Iterator it = packageDescr.getRules().iterator(); it.hasNext(); ) {
RuleDescr ruleDescr = (RuleDescr) it.next();
if ( isEmpty( ruleDescr.getNamespace() ) ) {
// make sure namespace is set on components
ruleDescr.setNamespace( packageDescr.getNamespace() );
}
Map<String, AttributeDescr> pkgAttributes = packageAttributes.get( packageDescr.getNamespace() );
inheritPackageAttributes( pkgAttributes,
ruleDescr );
if ( isEmpty( ruleDescr.getDialect() ) ) {
ruleDescr.addAttribute( new AttributeDescr( "dialect",
pkgRegistry.getDialect() ) );
}
addRule( ruleDescr );
}
}
compileAll();
try {
reloadAll();
} catch ( Exception e ) {
this.results.add( new DialectError( "Unable to wire compiled classes, probably related to compilation failures:" + e.getMessage() ) );
}
updateResults();
// iterate and compile
if ( this.ruleBase != null ) {
for ( final Iterator it = packageDescr.getRules().iterator(); it.hasNext(); ) {
RuleDescr ruleDescr = (RuleDescr) it.next();
pkgRegistry = this.pkgRegistryMap.get( ruleDescr.getNamespace() );
this.ruleBase.addRule( pkgRegistry.getPackage(),
pkgRegistry.getPackage().getRule( ruleDescr.getName() ) );
}
}
}