From b8f2435e2db50c2053a9d880ab9573cb0bc2630e Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 21 Oct 2015 18:26:10 +0200 Subject: M15 code cleanup --- src/Java/JavaDocumentationBuilder.kt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/Java/JavaDocumentationBuilder.kt') diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt index 1cd8d819..01ecb478 100644 --- a/src/Java/JavaDocumentationBuilder.kt +++ b/src/Java/JavaDocumentationBuilder.kt @@ -108,10 +108,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, } private fun MutableContent.convertSeeTag(tag: PsiDocTag) { - val linkElement = tag.linkElement() - if (linkElement == null) { - return - } + val linkElement = tag.linkElement() ?: return val seeSection = findSectionByTag("See Also") ?: addSection("See Also", null) val linkSignature = resolveLink(linkElement) val text = ContentText(linkElement.text) @@ -192,7 +189,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, is PsiField -> element.containingClass!!.qualifiedName + "#" + element.name is PsiMethod -> element.containingClass!!.qualifiedName + "#" + element.name + "(" + - element.parameterList.parameters.map { it.type.typeSignature() }.join(",") + ")" + element.parameterList.parameters.map { it.type.typeSignature() }.joinToString(",") + ")" else -> null } @@ -341,10 +338,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, } fun DocumentationNode.appendModifiers(element: PsiModifierListOwner) { - val modifierList = element.modifierList - if (modifierList == null) { - return - } + val modifierList = element.modifierList ?: return PsiModifier.MODIFIERS.forEach { if (it != "static" && modifierList.hasExplicitModifier(it)) { appendTextNode(it, Kind.Modifier) -- cgit