PsiElement (@NotNull PsiElement element) { PsiElement cur = element.getNextSibling(); while (cur != null) { if (!(cur instanceof PsiWhiteSpace)) { return cur; } else if (cur.textContains('\n')) { break; } cur = cur.getNextSibling(); } return null; }