mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-96624 Groovy: don't complete primitive types with space in new-expression
This commit is contained in:
+2
-1
@@ -135,7 +135,8 @@ public class GroovyCompletionData {
|
||||
.afterLeaf(psiElement().withElementType(GroovyTokenTypes.kAS).withParent(GrSafeCastExpression.class))
|
||||
.accepts(position);
|
||||
|
||||
addKeywords(result, !inCast, BUILT_IN_TYPES);
|
||||
boolean inNew = psiElement().afterLeaf(psiElement(GroovyTokenTypes.kNEW)).accepts(position);
|
||||
addKeywords(result, !inCast && !inNew, BUILT_IN_TYPES);
|
||||
}
|
||||
|
||||
if (psiElement(GrReferenceExpression.class).inside(or(psiElement(GrWhileStatement.class), psiElement(GrForStatement.class))).accepts(parent)) {
|
||||
|
||||
+7
@@ -1618,4 +1618,11 @@ new Foooo()<caret>
|
||||
''')
|
||||
}
|
||||
|
||||
void testBooleanInNewExpr() {
|
||||
doBasicTest('''\
|
||||
def b = new boolea<caret>
|
||||
''', '''\
|
||||
def b = new boolean<caret>
|
||||
''')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user