Search in sources :

Example 1 with LazyPackage

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;
}
Also used : LazyPackage(com.redhat.ceylon.model.loader.model.LazyPackage) Package(com.redhat.ceylon.model.typechecker.model.Package) LazyPackage(com.redhat.ceylon.model.loader.model.LazyPackage)

Aggregations

LazyPackage (com.redhat.ceylon.model.loader.model.LazyPackage)1 Package (com.redhat.ceylon.model.typechecker.model.Package)1