private void appendBodySortDeclarations(Body node) { // this is sort of hack, bypass the usual append method appendComments(node.getOpeningComments(), true); if (!isCompressing()) cssOnly.ensureSeparator(); append(node.getOpeningCurlyBrace()); if (!isCompressing()) cssOnly.ensureNewLine().increaseIndentationLevel(); Iterator<ASTCssNode> declarations = node.getDeclarations().iterator(); List<ASTCssNode> notDeclarations = node.getNotDeclarations(); while (declarations.hasNext()) { ASTCssNode declaration = declarations.next(); append(declaration); if (!isCompressing() && (declarations.hasNext() || notDeclarations.isEmpty())) cssOnly.ensureNewLine(); } appendAll(notDeclarations); appendComments(node.getOrphanComments(), false); if (!isCompressing()) cssOnly.decreaseIndentationLevel(); append(node.getClosingCurlyBrace()); // this is sort of hack, bypass the usual append method appendComments(node.getTrailingComments(), false); }
private void appendAllChilds(ASTCssNode node) { List<? extends ASTCssNode> allChilds = node.getChilds(); appendAll(allChilds); }