boolean (@NotNull ASTNode node) { PsiElement psiElement = node.getPsi(); if (psiElement instanceof PsiWhiteSpace) return true; Language nodeLang = psiElement.getLanguage(); if (!nodeLang.isKindOf(XMLLanguage.INSTANCE) || isTextOnlyNode(node) || node.getElementType() == XmlElementType.XML_PROLOG) { WhiteSpaceFormattingStrategy strategy = WhiteSpaceFormattingStrategyFactory.getStrategy(nodeLang); int length = node.getTextLength(); return strategy.check(node.getChars(), 0, length) >= length; } return false; }