final Project project = projectService.resolveProject( Paths.convert( path ) );
final Package pkg = projectService.resolvePackage( Paths.convert( path ) );
//Don't include rules created to parse DSL
final DefaultIndexBuilder builder = new DefaultIndexBuilder( project,
pkg ) {
@Override
public DefaultIndexBuilder addGenerator( final IndexElementsGenerator generator ) {
if ( generator instanceof Rule ) {
return this;
}
return super.addGenerator( generator );
}
};
final ProjectDataModelOracle dmo = getProjectDataModelOracle( path );
final PackageDescrIndexVisitor visitor = new PackageDescrIndexVisitor( dmo,
builder,
packageDescr );
visitor.visit();
return KObjectUtil.toKObject( path,
builder.build() );
}
} catch ( Exception e ) {
logger.error( e.getMessage() );
}
return index;