mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
[java] PsiClassRefType returns annotations embedded in a ref (IDEA-140234, IDEA-166062)
This commit is contained in:
@@ -288,6 +288,11 @@ public class AnnotationUtil {
|
||||
PsiAnnotation annotation = modifierList.findAnnotation(annotationFQN);
|
||||
if (annotation != null) return true;
|
||||
|
||||
PsiType type = null;
|
||||
if (listOwner instanceof PsiMethod) type = ((PsiMethod)listOwner).getReturnType();
|
||||
else if (listOwner instanceof PsiVariable) type = ((PsiVariable)listOwner).getType();
|
||||
if (type != null && type.findAnnotation(annotationFQN) != null) return true;
|
||||
|
||||
if (!skipExternal) {
|
||||
final Project project = listOwner.getProject();
|
||||
if (ExternalAnnotationsManager.getInstance(project).findExternalAnnotation(listOwner, annotationFQN) != null ||
|
||||
|
||||
Reference in New Issue
Block a user