IDEA-145752 Annotation attribute value: irrelevant completion proposals for boolean attribute (basic completion)

This commit is contained in:
peter
2015-10-02 14:42:41 +02:00
parent 0eb643a725
commit 1154b6f096
9 changed files with 51 additions and 6 deletions
@@ -0,0 +1,5 @@
@interface Foo {
boolean foo();
}
@Foo(foo=<caret>)
@@ -0,0 +1,6 @@
@interface Foo {
MyEnum value();
}
enum MyEnum { x, y }
@Foo(<caret>)
@@ -0,0 +1,5 @@
@interface Foo {
int value();
}
@Foo(<caret>)
@@ -0,0 +1,5 @@
@interface Foo {
Class attr();
}
@Foo(attr = <caret>)
@@ -0,0 +1,5 @@
@interface Foo {
Class value();
}
@Foo(<caret>)
@@ -112,7 +112,13 @@ public class KeywordCompletionTest extends LightCompletionTestCase {
selectItem(myItems[0], '!');
checkResultByFile(BASE_PATH + "/" + getTestName(true) + "_after.java");
}
public void testNoPrimitivesInBooleanAnnotationAttribute() { doTest(1, "true", "int", "boolean"); }
public void testNoPrimitivesInIntAnnotationValueAttribute() { doTest(0, "true", "int", "boolean"); }
public void testNoPrimitivesInEnumAnnotationAttribute() { doTest(0, "true", "int", "boolean"); }
public void testPrimitivesInClassAnnotationValueAttribute() { doTest(2, "true", "int", "boolean"); }
public void testPrimitivesInClassAnnotationAttribute() { doTest(3, "true", "int", "boolean"); }
public void testImportStatic() throws Exception { doTest(1, "static"); }
public void testAbstractInInterface() throws Exception { doTest(1, "abstract"); }
public void testCharInAnnotatedParameter() throws Exception { doTest(1, "char"); }