IDEA-89175 Completing an annotation on an @interface class should always suggest meta-annotations

This commit is contained in:
peter
2012-07-24 12:29:58 +02:00
parent d901cd9d5d
commit 8e87fb2551
5 changed files with 220 additions and 201 deletions
@@ -1,12 +1,2 @@
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Z<caret>
@interface Foo {
}
@Target({ElementType.ANNOTATION_TYPE})
@interface ZMetaAnno {}
@Target({ElementType.LOCAL_VARIABLE})
@interface ZLocalAnno {}
@T<caret>
@interface Foo { }
@@ -343,7 +343,16 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
}
public void testPreferApplicableAnnotations() throws Throwable {
checkPreferredItems 0, 'ZMetaAnno', 'ZLocalAnno'
myFixture.addClass '''
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target({ElementType.ANNOTATION_TYPE})
@interface TMetaAnno {}
@Target({ElementType.LOCAL_VARIABLE})
@interface TLocalAnno {}'''
checkPreferredItems 0, 'TMetaAnno', 'Target', 'TreeSelectionMode', 'TLocalAnno'
}
public void testJComponentAddNewWithStats() throws Throwable {