process add enum annotations specifics (IDEA-94090)

This commit is contained in:
anna
2012-11-02 15:37:47 +01:00
parent 80c294778b
commit 2607a441fe
3 changed files with 12 additions and 0 deletions
@@ -133,6 +133,9 @@ public class PsiAnnotationImpl extends JavaStubPsiElement<PsiAnnotationStub> imp
PsiAnnotationOwner typeElement;
if (member instanceof PsiVariable) {
if (member instanceof PsiEnumConstant && parent instanceof PsiAnnotationOwner){
return (PsiAnnotationOwner)parent;
}
typeElement = ((PsiVariable)member).getTypeElement();
}
else if (member instanceof PsiMethod && !((PsiMethod)member).isConstructor()) {
@@ -0,0 +1,8 @@
enum E
{
@D
VAR
}
@interface D {
}
@@ -169,4 +169,5 @@ public class LightAdvHighlightingJdk7Test extends LightDaemonAnalyzerTestCase {
public void testUncheckedWarningIDEA70620() throws Exception { doTest(true, false); }
public void testUncheckedWarningIDEA60166() throws Exception { doTest(true, false); }
public void testUncheckedWarningIDEA21432() throws Exception { doTest(true, false); }
public void testAnnotationApplicability() throws Exception { doTest(true, false); }
}