@Nullable
  private static PsiElement getClassContainingResolve(final GroovyResolveResult result) {
    final PsiElement elem = result.getElement();
    if (elem != null) {
      if (elem instanceof PsiMember) {
        return ((PsiMember)elem).getContainingClass();
      }
      else {
        return PsiUtil.getContextClass(elem);
      }
    }
    return null;
  }
@Nullable
  private static PsiElement getClassContainingResolve(final GroovyResolveResult result)