accept that with different library versions inheritance relation may be intransitive...
[idea/community.git] / java / java-impl / src / com / intellij / util / xml / impl / ExtendsClassChecker.java
index bcf0c747dc13f01ef286991680158ad0890b8b99..3fe146e787c0300e7141a7a9af120ab45cad718d 100644 (file)
@@ -19,7 +19,6 @@ import com.intellij.openapi.project.Project;
 import com.intellij.psi.*;
 import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReference;
 import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider;
-import com.intellij.psi.search.GlobalSearchScope;
 import com.intellij.psi.util.InheritanceUtil;
 import com.intellij.psi.util.PsiUtil;
 import com.intellij.util.ProcessingContext;
@@ -82,7 +81,7 @@ public class ExtendsClassChecker extends DomCustomAnnotationChecker<ExtendClass>
                                                                    final boolean allowEnum,
                                                                    final DomElementAnnotationHolder holder) {
     final Project project = element.getManager().getProject();
-    PsiClass extendClass = JavaPsiFacade.getInstance(project).findClass(name, GlobalSearchScope.allScope(project));
+    PsiClass extendClass = JavaPsiFacade.getInstance(project).findClass(name, value.getResolveScope());
     final SmartList<DomElementProblemDescriptor> list = new SmartList<DomElementProblemDescriptor>();
     if (extendClass != null) {
       if (!name.equals(value.getQualifiedName()) && !value.isInheritor(extendClass, true)) {