PsiElement (@NotNull PsiElement element) { PsiElement anchor = PsiTreeUtil.prevLeaf(element); while (anchor instanceof PsiComment || anchor instanceof PsiWhiteSpace) { anchor = PsiTreeUtil.prevLeaf(anchor, false); } return anchor; }