mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
IDEA-136162 (type annotations in anonymous classes)
This commit is contained in:
+5
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -132,7 +132,10 @@ public class PsiAnnotationImpl extends JavaStubPsiElement<PsiAnnotationStub> imp
|
||||
}
|
||||
else if (parent instanceof PsiJavaCodeReferenceElement) {
|
||||
PsiElement ctx = PsiTreeUtil.skipParentsOfType(parent, PsiJavaCodeReferenceElement.class);
|
||||
if (ctx instanceof PsiReferenceList || ctx instanceof PsiNewExpression || ctx instanceof PsiTypeElement) {
|
||||
if (ctx instanceof PsiReferenceList ||
|
||||
ctx instanceof PsiNewExpression ||
|
||||
ctx instanceof PsiTypeElement ||
|
||||
ctx instanceof PsiAnonymousClass) {
|
||||
return new PsiClassReferenceType((PsiJavaCodeReferenceElement)parent, null);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -59,6 +59,7 @@ class Outer {
|
||||
{
|
||||
new @TA Object();
|
||||
new @TA ArrayList<String>();
|
||||
new @TA Runnable() { public void run() { } }.run();
|
||||
|
||||
ArrayList<String> var = new <String> @TA ArrayList();
|
||||
new @TA Outer().new @TA Middle();
|
||||
|
||||
Reference in New Issue
Block a user