use of com.redhat.ceylon.model.loader.model.LazyPackage in project ceylon-compiler by ceylon.
the class CeylonDocModuleManager method createPackage.
@Override
public Package createPackage(String pkgName, Module module) {
// never create a lazy package for ceylon.language when we're documenting it
if ((pkgName.equals(AbstractModelLoader.CEYLON_LANGUAGE) || pkgName.startsWith(AbstractModelLoader.CEYLON_LANGUAGE + ".")) && isModuleLoadedFromSource(AbstractModelLoader.CEYLON_LANGUAGE))
return super.createPackage(pkgName, module);
final Package pkg = new LazyPackage(getModelLoader());
List<String> name = pkgName.isEmpty() ? Collections.<String>emptyList() : splitModuleName(pkgName);
pkg.setName(name);
if (module != null) {
module.getPackages().add(pkg);
pkg.setModule(module);
}
return pkg;
}
Aggregations