mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
IDEA-232566 - added an edge between annotation access expression and annotation method in the ref graph, handled the Repeatable annotation
GitOrigin-RevId: 2fd2edd464423cda801e29c9cfd9fc03af72da6c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3432bd3e89
commit
fb0badb4cd
@@ -60,6 +60,26 @@ public class RefJavaUtilImpl extends RefJavaUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visitElement(@NotNull UElement node) {
|
||||
UNamedExpression namedExpr = ObjectUtils.tryCast(node, UNamedExpression.class);
|
||||
if (namedExpr == null) return false;
|
||||
UAnnotation ann = ObjectUtils.tryCast(namedExpr.getUastParent(), UAnnotation.class);
|
||||
if (ann == null) return false;
|
||||
String annFqn = ann.getQualifiedName();
|
||||
if (annFqn == null) return false;
|
||||
PsiMethod annMethod = UastUtils.getAnnotationMethod(namedExpr);
|
||||
if (annMethod == null) return false;
|
||||
RefMethod annRefMethod = ObjectUtils.tryCast(refFrom.getRefManager().getReference(annMethod), RefMethod.class);
|
||||
if (annRefMethod == null) return false;
|
||||
RefJavaElementImpl annRefClass = ObjectUtils.tryCast(
|
||||
annRefMethod.getRefManager().getReference(annMethod.getContainingClass()), RefJavaElementImpl.class);
|
||||
if (annRefClass != null) {
|
||||
annRefClass.addReference(annRefMethod, annMethod.getOriginalElement(), decl, false, true, null);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visitTypeReferenceExpression(@NotNull UTypeReferenceExpression node) {
|
||||
PsiType type = node.getType();
|
||||
|
||||
Reference in New Issue
Block a user