compileKdoc fails, fix it

This commit is contained in:
Stepan Koltsov
2012-03-02 23:01:42 +04:00
parent c9e3891a5e
commit cd3b965b3c
@@ -22,7 +22,7 @@ import org.jetbrains.jet.lang.psi.JetFile
import org.jetbrains.jet.lang.descriptors.PropertyDescriptor import org.jetbrains.jet.lang.descriptors.PropertyDescriptor
import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor
fun containerName(descriptor: DeclarationDescriptor): String = qualifiedName(descriptor.containingDeclaration) fun containerName(descriptor: DeclarationDescriptor): String = qualifiedName(descriptor.getContainingDeclaration())
fun qualifiedName(descriptor: DeclarationDescriptor?): String { fun qualifiedName(descriptor: DeclarationDescriptor?): String {
if (descriptor == null || descriptor is ModuleDescriptor) { if (descriptor == null || descriptor is ModuleDescriptor) {
@@ -307,7 +307,7 @@ class KModel(var context: BindingContext, var title: String = "Documentation", v
fun getType(aType: JetType?): KType? { fun getType(aType: JetType?): KType? {
if (aType != null) { if (aType != null) {
val classifierDescriptor = aType.constructor.declarationDescriptor val classifierDescriptor = aType.getConstructor().getDeclarationDescriptor()
val klass = if (classifierDescriptor is ClassDescriptor) { val klass = if (classifierDescriptor is ClassDescriptor) {
getClass(classifierDescriptor) getClass(classifierDescriptor)
} else null } else null
@@ -318,7 +318,7 @@ class KModel(var context: BindingContext, var title: String = "Documentation", v
fun getClass(classElement: ClassDescriptor): KClass? { fun getClass(classElement: ClassDescriptor): KClass? {
val name = classElement.getName() val name = classElement.getName()
val container = classElement.containingDeclaration val container = classElement.getContainingDeclaration()
if (name != null && container is NamespaceDescriptor) { if (name != null && container is NamespaceDescriptor) {
val pkg = getPackage(container) val pkg = getPackage(container)
return pkg.getClass(name, classElement) return pkg.getClass(name, classElement)
@@ -454,7 +454,7 @@ class KType(val jetType: JetType, val model: KModel, val klass: KClass?, val arg
this.description = klass.description this.description = klass.description
this.detailedDescription = klass.detailedDescription this.detailedDescription = klass.detailedDescription
} }
for (arg in jetType.arguments) { for (arg in jetType.getArguments()) {
if (arg != null) { if (arg != null) {
val argJetType = arg.getType() val argJetType = arg.getType()
val t = model.getType(argJetType) val t = model.getType(argJetType)
@@ -586,4 +586,4 @@ class KAnnotation(var klass: KClass) : KAnnotated() {
// TODO add some parameter values? // TODO add some parameter values?
fun toString() = "@$klass.simpleName" fun toString() = "@$klass.simpleName"
} }