List<RestBlock> () { List<RestBlock> blocks = new ArrayList<>(); for (ASTNode child = myNode.getFirstChildNode(); child != null; child = child.getTreeNext()) { IElementType childType = child.getElementType(); if (child.getTextRange().getLength() == 0) continue; if (childType == RestTokenTypes.WHITESPACE) { continue; } blocks.add(buildSubBlock(child)); } return Collections.unmodifiableList(blocks); }