GroovyResolveResult[] (GroovyPsiElement place) { final PsiElement parent = place.getParent(); GroovyResolveResult[] variants = GroovyResolveResult.EMPTY_ARRAY; if (parent instanceof GrCallExpression) { variants = ((GrCallExpression)parent).getCallVariants(place instanceof GrExpression ? (GrExpression)place : null); } else if (parent instanceof GrConstructorInvocation) { final PsiClass clazz = ((GrConstructorInvocation)parent).getDelegatedClass(); if (clazz != null) { final PsiMethod[] constructors = clazz.getConstructors(); variants = getConstructorResolveResult(constructors, place); } } else if (parent instanceof GrAnonymousClassDefinition) { final PsiElement element = ((GrAnonymousClassDefinition)parent).getBaseClassReferenceGroovy().resolve(); if (element instanceof PsiClass) { final PsiMethod[] constructors = ((PsiClass)element).getConstructors(); variants = getConstructorResolveResult(constructors, place); } } else if (place instanceof GrReferenceExpression) { variants = ((GrReferenceExpression)place).getSameNameVariants(); } return variants; }