@Nullable
  private static GrNamedElement getReferencedElement(final GrParameterListOwner owner) {
    if (owner instanceof GrMethodImpl) return ((GrMethodImpl)owner);
    if (owner instanceof GrClosableBlock) {
      final PsiElement parent = owner.getParent();
      if (parent instanceof GrVariable && ((GrVariable)parent).getInitializerGroovy() == owner) return ((GrVariable)parent);
    }
    return null;
  }
@Nullable
  private static GrNamedElement getReferencedElement(final GrParameterListOwner owner)