PsiElement (PsiElement elem) { elem = PsiTreeUtil.prevLeaf(elem); while (elem != null && (elem instanceof PsiWhiteSpace || elem instanceof PsiComment || GroovyTokenTypes.mNLS.equals(elem.getNode().getElementType()))) { elem = PsiTreeUtil.prevLeaf(elem); } return elem; }