mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection-integration - exclude an edge between annotation access expression and annotation method
GitOrigin-RevId: bb7258de864e2b32529e679785d74ef145a43e33
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ba3470c6f2
commit
937831e0de
-20
@@ -60,26 +60,6 @@ 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();
|
||||
|
||||
@@ -25,10 +25,5 @@
|
||||
<line>25</line>
|
||||
<description>Interface is not implemented.</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>SimpleAnnotation.java</file>
|
||||
<line>2</line>
|
||||
<description>Method is never used.</description>
|
||||
</problem>
|
||||
</problems>
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
@interface TestAnn {
|
||||
String str() default "";
|
||||
int digit() default 2;
|
||||
}
|
||||
|
||||
@TestAnn(digit = 1)
|
||||
class Test2 {
|
||||
@TestAnn(digit = 2)
|
||||
public static void main(String[] args) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user