PsiElement (@Nullable PsiElement at) { PsiElement nextLeaf = at; while (nextLeaf != null && (nextLeaf instanceof PsiWhiteSpace || nextLeaf instanceof PsiComment || nextLeaf instanceof PsiErrorElement || nextLeaf.getTextLength() == 0)) { nextLeaf = PsiTreeUtil.nextLeaf(nextLeaf, true); } return nextLeaf; }