Ask for external annotation only while looking for nullability or kotlin signature annotation

This commit is contained in:
Nikolay Krasko
2012-11-28 18:13:46 +04:00
parent c9bdfd2f07
commit 2dafbdc45a
12 changed files with 28 additions and 15 deletions
@@ -84,7 +84,7 @@ class KotlinSignatureUtil {
static PsiAnnotation findKotlinSignatureAnnotation(@NotNull PsiElement element) {
if (!(element instanceof PsiModifierListOwner)) return null;
PsiModifierListOwner annotationOwner = getAnnotationOwner(element);
PsiAnnotation annotation = JavaAnnotationResolver.findAnnotation(annotationOwner, KOTLIN_SIGNATURE_ANNOTATION);
PsiAnnotation annotation = JavaAnnotationResolver.findAnnotationWithExternal(annotationOwner, KOTLIN_SIGNATURE_ANNOTATION);
if (annotation == null) return null;
if (annotation.getParameterList().getAttributes().length == 0) return null;
return annotation;