private static @Nullable PsiElement getResolveElement(GroovyReference reference) {
        GroovyResolveResult[] results = reference.multiResolve(false);
        for (GroovyResolveResult result : results) {
          PsiElement element = result.getElement();
          if (element != null) {
            return element;
          }
        }
        return null;
      }
private static @Nullable PsiElement getResolveElement(GroovyReference reference)