boolean (@NotNull ASTNode child) { // The whole idea of variable declarations alignment is that complete declaration blocks which children are to be aligned hold // reference to the same AlignmentStrategy object, hence, reuse the same Alignment objects. So, there is no point in checking // if it's necessary to align sub-blocks if shared strategy is not defined. if (!mySettings.ALIGN_GROUP_FIELD_DECLARATIONS) { return false; } IElementType childType = child.getElementType(); // We don't want to align subsequent identifiers in single-line declarations like 'int i1, i2, i3'. I.e. only 'i1' // should be aligned then. ASTNode previousNode = FormatterUtil.getPreviousNonWhitespaceSibling(child); if (childType == JavaTokenType.IDENTIFIER && (previousNode == null || previousNode.getElementType() == JavaTokenType.COMMA)) { return false; } return true; }