aboutsummaryrefslogtreecommitdiff
path: root/src/Model/DocumentationResolver.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-12 02:29:55 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-12 02:29:55 +0400
commite155d101a52f62b0c8c10778fdf0068549b413be (patch)
tree9ebd12c36837440a7ee269835fdcef02586a74d1 /src/Model/DocumentationResolver.kt
parent1fc4fca76592bb540f9ed124fa8be4b991dfafeb (diff)
downloaddokka-e155d101a52f62b0c8c10778fdf0068549b413be.tar.gz
dokka-e155d101a52f62b0c8c10778fdf0068549b413be.tar.bz2
dokka-e155d101a52f62b0c8c10778fdf0068549b413be.zip
Implement resolution scope chaining for all scopes except imported packages.
Diffstat (limited to 'src/Model/DocumentationResolver.kt')
-rw-r--r--src/Model/DocumentationResolver.kt10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Model/DocumentationResolver.kt b/src/Model/DocumentationResolver.kt
index e69a70f8..b5b6b1a2 100644
--- a/src/Model/DocumentationResolver.kt
+++ b/src/Model/DocumentationResolver.kt
@@ -23,10 +23,18 @@ fun DocumentationNode.checkResolve() {
}
if (symbol == null)
- throw IllegalStateException("Cannot resolve $item in $this")
+ println("WARNING: Cannot resolve $item in ${path(this)}")
}
for (reference in allReferences().filterNot { it.kind == DocumentationReferenceKind.Owner }) {
reference.to.checkResolve()
}
+}
+
+fun path(node: DocumentationNode) : String {
+ val owner = node.owner
+ if (owner != null)
+ return "$node in ${path(owner)}"
+ else
+ return "$node"
} \ No newline at end of file