RestBlock (ASTNode child) { IElementType childType = child.getElementType(); IElementType grandparentType = myNode.getTreeParent() == null ? null : myNode.getTreeParent().getElementType(); Indent childIndent = Indent.getNoneIndent(); if (grandparentType == RestElementTypes.DIRECTIVE_BLOCK && childType == RestTokenTypes.FIELD) { childIndent = Indent.getNormalIndent(); } return new RestBlock(child, null, childIndent, null); }