if (stateObject.isDecorated()) {
toText(stateObject);
}
else {
WhenClause expression = stateObject.getExpression();
// 'WHEN'
appendIdentifier((expression != null) ? expression.getActualWhenIdentifier() : WHEN, WHEN);
if (shouldOutput(expression) || expression.hasSpaceAfterWhen()) {
writer.append(SPACE);
}
// WHEN expression
if (stateObject.hasConditional()) {
stateObject.getConditional().accept(this);
}
if (shouldOutput(expression) || expression.hasSpaceAfterWhenExpression()) {
writer.append(SPACE);
}
// 'THEN'
if (shouldOutput(expression) || expression.hasThen()) {
appendIdentifier((expression != null) ? expression.getActualThenIdentifier() : THEN, THEN);
}
if (shouldOutput(expression) || expression.hasSpaceAfterThen()) {
writer.append(SPACE);
}
// THEN expression
if (stateObject.hasThen()) {