TextRange (PsiElement element) { if (element instanceof GrReferenceExpression referenceExpression) { PsiElement nameElement = referenceExpression.getReferenceNameElement(); TextRange stringContentRange = GrStringUtil.getStringContentRange(nameElement); if (stringContentRange != null) return stringContentRange.shiftRight(nameElement.getStartOffsetInParent()); } return null; }