PsiElement (PsiElement element, boolean forward) { while (true) { element = forward ? element.getNextSibling() : element.getPrevSibling(); if (element == null) break; final ASTNode node = element.getNode(); if (node == null) break; if (GroovyDocElementTypes.GROOVY_DOC_COMMENT.equals(node.getElementType()) || !TokenSets.WHITE_SPACES_OR_COMMENTS.contains(node.getElementType())) { break; } } return element; }