void (PsiElement element, IfStatementBranch out) { PsiComment comment = getPrevSiblingOfType(element, PsiComment.class, PsiStatement.class); while (comment != null) { out.addComment(getCommentText(comment)); comment = getPrevSiblingOfType(comment, PsiComment.class, PsiStatement.class); } }