String (@Nullable PsiElement expression) { if (!(expression instanceof GrReferenceExpression ref)) return null; PsiElement firstChild = expression.getFirstChild(); if (firstChild != expression.getLastChild() || !PsiImplUtil.isLeafElementOfType(firstChild, GroovyTokenTypes.mIDENT)) return null; if (ref.isQualified()) return null; return ref.getReferenceName(); }