aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Diagnostics.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-12 15:14:03 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-12 15:14:03 +0400
commit52deaf7d9b31a4cc5ed36a280e07fdfeff975362 (patch)
tree7864aa9cd01a8d7c793246c6d993747577bdab3b /src/Model/Diagnostics.kt
parent9ebe89742ccf29bb7efb6198666bd968397320e0 (diff)
downloaddokka-52deaf7d9b31a4cc5ed36a280e07fdfeff975362.tar.gz
dokka-52deaf7d9b31a4cc5ed36a280e07fdfeff975362.tar.bz2
dokka-52deaf7d9b31a4cc5ed36a280e07fdfeff975362.zip
Add signature generator classes, refactor classes into files and nested enums.
Diffstat (limited to 'src/Model/Diagnostics.kt')
-rw-r--r--src/Model/Diagnostics.kt14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Model/Diagnostics.kt b/src/Model/Diagnostics.kt
index 723bd59d..470d7973 100644
--- a/src/Model/Diagnostics.kt
+++ b/src/Model/Diagnostics.kt
@@ -5,18 +5,18 @@ import org.jetbrains.jet.lang.resolve.name.*
import org.jetbrains.jet.lang.resolve.BindingContext
fun BindingContext.checkResolveChildren(node : DocumentationNode) {
- if (node.kind != DocumentationNodeKind.Module && node.kind != DocumentationNodeKind.Package) {
+ if (node.kind != DocumentationNode.Kind.Module && node.kind != DocumentationNode.Kind.Package) {
// TODO: we don't resolve packages and modules for now
val parentScope = getResolutionScope(node.descriptor)
for (item in node.details + node.members) {
val symbolName = item.name
val symbol: DeclarationDescriptor? = when (item.kind) {
- DocumentationNodeKind.Receiver -> (parentScope.getContainingDeclaration() as FunctionDescriptor).getReceiverParameter()
- DocumentationNodeKind.Parameter -> parentScope.getLocalVariable(Name.guess(symbolName))
- DocumentationNodeKind.Function -> parentScope.getFunctions(Name.guess(symbolName)).firstOrNull()
- DocumentationNodeKind.Property -> parentScope.getProperties(Name.guess(symbolName)).firstOrNull()
- DocumentationNodeKind.Constructor -> parentScope.getFunctions(Name.guess(symbolName)).firstOrNull()
+ DocumentationNode.Kind.Receiver -> (parentScope.getContainingDeclaration() as FunctionDescriptor).getReceiverParameter()
+ DocumentationNode.Kind.Parameter -> parentScope.getLocalVariable(Name.guess(symbolName))
+ DocumentationNode.Kind.Function -> parentScope.getFunctions(Name.guess(symbolName)).firstOrNull()
+ DocumentationNode.Kind.Property -> parentScope.getProperties(Name.guess(symbolName)).firstOrNull()
+ DocumentationNode.Kind.Constructor -> parentScope.getFunctions(Name.guess(symbolName)).firstOrNull()
else -> parentScope.getClassifier(Name.guess(symbolName))
}
@@ -25,7 +25,7 @@ fun BindingContext.checkResolveChildren(node : DocumentationNode) {
}
}
- for (reference in node.allReferences().filterNot { it.kind == DocumentationReferenceKind.Owner }) {
+ for (reference in node.allReferences().filterNot { it.kind == DocumentationReference.Kind.Owner }) {
checkResolveChildren(reference.to)
}
}