aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/DocumentationContext.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Kotlin/DocumentationContext.kt')
-rw-r--r--src/Kotlin/DocumentationContext.kt18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/Kotlin/DocumentationContext.kt b/src/Kotlin/DocumentationContext.kt
index 95c3ded1..b13f08ea 100644
--- a/src/Kotlin/DocumentationContext.kt
+++ b/src/Kotlin/DocumentationContext.kt
@@ -47,16 +47,14 @@ fun BindingContext.createDocumentationModule(name: String,
packages: Set<FqName>,
options: DocumentationOptions = DocumentationOptions()): DocumentationModule {
val documentationModule = DocumentationModule(name)
- val context = DocumentationContext(this)
- val visitor = DocumentationNodeBuilder(context)
- for (packageName in packages) {
- val pkg = module.getPackage(packageName)
- pkg!!.accept(DocumentationBuildingVisitor(this, options, visitor), documentationModule)
+ val builder = DocumentationBuilder(this, options)
+ with(builder) {
+ for (packageName in packages) {
+ val pkg = module.getPackage(packageName)
+ if (pkg != null)
+ documentationModule.appendChild(pkg, DocumentationReference.Kind.Member)
+ }
}
-
- context.resolveReferences(documentationModule)
-
- // TODO: Uncomment for resolve verification
- // checkResolveChildren(documentationModule)
+ builder.resolveReferences(documentationModule)
return documentationModule
}