this.getClass().getClassLoader() );
// make an automatic import for the current package
typeResolver.addImport( pkgDescr.getName() + ".*" );
typeResolver.addImport( "java.lang.*" );
final RuleBuilder builder = new RuleBuilder();
final PackageBuilderConfiguration conf = pkgBuilder.getPackageBuilderConfiguration();
DialectCompiletimeRegistry dialectRegistry = pkgBuilder.getPackageRegistry( pkg.getName() ).getDialectCompiletimeRegistry();
Dialect dialect = dialectRegistry.getDialect( "java" );
RuleBuildContext context = new RuleBuildContext( pkgBuilder,
ruleDescr,
dialectRegistry,
pkg,
dialect );
builder.build( context );
Assert.assertTrue( context.getErrors().toString(),
context.getErrors().isEmpty() );
final Rule rule = context.getRule();