GrLiteral (@NotNull PsiElement psi) { PsiElement parent = psi.getParent(); if (isStringLiteral(parent)) { return (GrLiteral)parent; } if (parent == null) return null; PsiElement gParent = parent.getParent(); if (isStringLiteral(gParent)) { return (GrLiteral)gParent; } if (psi instanceof GrString) { return (GrLiteral)psi; } return null; }