mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] fix completion of type parameters in var position (IDEA-191728)
This commit is contained in:
+3
-6
@@ -127,12 +127,9 @@ public class GrMainCompletionProvider extends CompletionProvider<CompletionParam
|
||||
if (parent instanceof GrVariable) {
|
||||
final PsiElement pparent = parent.getParent();
|
||||
if (pparent instanceof GrVariableDeclaration) {
|
||||
final PsiElement errorElement = PsiUtil.skipWhitespacesAndComments(parent.getPrevSibling(), false);
|
||||
if (errorElement instanceof PsiErrorElement) {
|
||||
final PsiElement child = errorElement.getFirstChild();
|
||||
if (child instanceof GrTypeParameterList) {
|
||||
return (GrTypeParameterList)child;
|
||||
}
|
||||
PsiElement candidate = PsiUtil.skipWhitespacesAndComments(parent.getPrevSibling(), false);
|
||||
if (candidate instanceof GrTypeParameterList) {
|
||||
return (GrTypeParameterList)candidate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -102,7 +102,6 @@ class GroovyCompletionTest extends GroovyCompletionTestBase {
|
||||
doVariantableTest("MyParameter", "MySecondParameter")
|
||||
}
|
||||
|
||||
@Bombed(month = 6, day = 10, user = "daniil")
|
||||
void testUnfinishedMethodTypeParameter2() {
|
||||
doVariantableTest("MyParameter", "MySecondParameter")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user