List<Block> () { // // Fix for EA-19269: // Split XML attribute value to the value itself and delimiters (needed for the case when it contains // template language tags inside). // if (myNode.getElementType() == XmlElementType.XML_ATTRIBUTE_VALUE) { return splitAttribute(myNode, myXmlFormattingPolicy); } if (myNode.getElementType() == XmlElementType.XML_COMMENT) { List<Block> result = new SmartList<>(); if (buildInjectedPsiBlocks(result, myNode, myWrap, null, Indent.getNoneIndent())) { return result; } return splitComment(); } if (myNode.getFirstChildNode() != null) { boolean keepWhitespaces = shouldKeepWhitespaces(); final ArrayList<Block> result = new ArrayList<>(5); ASTNode child = myNode.getFirstChildNode(); while (child != null) { if (child.getTextLength() > 0) { if (containsWhiteSpacesOnly(child)) { if (keepWhitespaces) { result.add(new ReadOnlyBlock(child)); } } else { child = processChild(result, child, getDefaultWrap(child), null, getChildDefaultIndent()); } } if (child != null) { LOG.assertTrue(child.getTreeParent() == myNode); child = child.getTreeNext(); } } return result; } else { return EMPTY; } }