PsiElement (PsiElement element) { PsiElement sibling = element.getNextSibling(); if (sibling != null) return sibling; element = element.getParent(); if (element != null) return getNextElement(element); return null; }