@Nullable
  private static GrReferenceElement<?> findGroovyReference(@NotNull PsiElement position) {
    final PsiElement parent = position.getParent();
    if (parent instanceof GrReferenceElement) {
      return (GrReferenceElement<?>)parent;
    }
    if (couldContainReference(position)) {
      return GroovyPsiElementFactory.getInstance(position.getProject()).createCodeReference("Foo", position);
    }
    return null;
  }
@Nullable
  private static GrReferenceElement<?> findGroovyReference(@NotNull PsiElement position)