Extract FunctionResolver and AnnotationResolver classes from JavaDescriptorResolver

This commit is contained in:
Pavel V. Talanov
2012-10-06 19:08:57 +04:00
parent 6ce1f8c111
commit 88bd991729
12 changed files with 329 additions and 202 deletions
@@ -26,8 +26,8 @@ import com.intellij.psi.impl.compiled.ClsElementImpl;
import com.intellij.psi.impl.source.SourceTreeToPsiMap;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.lang.resolve.java.JavaDescriptorResolver;
import org.jetbrains.jet.lang.resolve.java.JvmStdlibNames;
import org.jetbrains.jet.lang.resolve.java.resolver.AnnotationResolver;
/**
* @author Evgeny Gerashchenko
@@ -84,7 +84,7 @@ class KotlinSignatureUtil {
static PsiAnnotation findKotlinSignatureAnnotation(@NotNull PsiElement element) {
if (!(element instanceof PsiModifierListOwner)) return null;
PsiModifierListOwner annotationOwner = getAnnotationOwner(element);
PsiAnnotation annotation = JavaDescriptorResolver.findAnnotation(annotationOwner, KOTLIN_SIGNATURE_ANNOTATION);
PsiAnnotation annotation = AnnotationResolver.findAnnotation(annotationOwner, KOTLIN_SIGNATURE_ANNOTATION);
if (annotation == null) return null;
if (annotation.getParameterList().getAttributes().length == 0) return null;
return annotation;