IDEA-88769 Java keyword completion: duplicate "final" suggestion

This commit is contained in:
peter
2012-07-16 18:58:15 +02:00
parent a2c3620781
commit b065e86725
3 changed files with 4 additions and 1 deletions
@@ -142,7 +142,7 @@ public class JavaCompletionData extends JavaAwareCompletionData {
END_OF_BLOCK,
new PatternFilter(psiElement().afterLeaf(
or(
psiElement().withoutText(".").inside(psiElement(PsiModifierList.class)),
psiElement().withoutText(".").inside(psiElement(PsiModifierList.class).withParent(not(psiElement(PsiParameter.class)))),
psiElement().isNull())))
),
new PatternFilter(not(psiElement().afterLeaf("@"))));
@@ -0,0 +1,2 @@
public class Util {
void foo(@Foo <caret> String[] args) { }}
@@ -101,6 +101,7 @@ public class KeywordCompletionTest extends LightCompletionTestCase {
public void testAbstractInInterface() throws Exception { doTest(1, "abstract"); }
public void testCharInAnnotatedParameter() throws Exception { doTest(1, "char"); }
public void testReturnInTernary() throws Exception { doTest(1, "return"); }
public void testFinalAfterParameterAnno() throws Exception { doTest(2, "final", "float", "class"); }
public void testTryInExpression() throws Exception {
configureByFile(BASE_PATH + "/" + getTestName(true) + ".java");