From 708c5fc36c943ab7fa492f35f4b6ed75c985c12a Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Sat, 12 Jul 2014 18:23:07 +0400 Subject: Do not fail if source is not found, there are lots of generated items. --- src/Analysis/CommentsAPI.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Analysis') diff --git a/src/Analysis/CommentsAPI.kt b/src/Analysis/CommentsAPI.kt index c8a2ed3c..a1823740 100644 --- a/src/Analysis/CommentsAPI.kt +++ b/src/Analysis/CommentsAPI.kt @@ -8,7 +8,7 @@ import org.jetbrains.jet.lang.psi.* fun BindingContext.getDocumentationElements(descriptor: DeclarationDescriptor): List { val psiElement = DescriptorToSourceUtils.descriptorToDeclaration(descriptor) if (psiElement == null) - throw IllegalArgumentException("$descriptor doesn't have connection to source code, is it synthetic?") + return listOf() return psiElement.previousSiblings() // go backwards .takeWhile { it !is JetDeclaration } // till previous declaration -- cgit