boolean wasACase = false;
boolean wasABreak = false;
if (statements != null) {
int statementsLength = statements.length;
for (int i = 0; i < statementsLength; i++) {
final Statement statement = statements[i];
if (statement instanceof CaseStatement) {
if (wasABreak) {
this.scribe.setIndentation(switchIndentationLevel, caseIndentation);
this.scribe.printComment();
} else {
if (wasACase) {
this.scribe.printComment(Scribe.PRESERVE_EMPTY_LINES_IN_SWITCH_CASE);
} else {
this.scribe.printComment();
}
this.scribe.setIndentation(switchIndentationLevel, caseIndentation);
}
if (wasACase) {
this.scribe.printNewLine();
}
statement.traverse(this, scope);
// Print following trailing (if any) comment at statement indentation
this.scribe.setIndentation(switchIndentationLevel, statementIndentation);
this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.COMPLEX_TRAILING_COMMENT);
wasACase = true;
wasABreak = false;
} else if (statement instanceof BreakStatement) {
this.scribe.setIndentation(switchIndentationLevel, breakIndentation);
if (wasACase) {
this.scribe.printNewLine();
}
this.scribe.printComment();
statement.traverse(this, scope);
wasACase = false;
wasABreak = true;
} else if (statement instanceof Block) {
this.scribe.setIndentation(switchIndentationLevel, wasACase ? caseIndentation : statementIndentation);
this.scribe.printComment();
String bracePosition = wasACase ? this.preferences.brace_position_for_block_in_case : this.preferences.brace_position_for_block;
formatBlock((Block) statement, scope, bracePosition, this.preferences.insert_space_before_opening_brace_in_block);
wasACase = false;
wasABreak = false;
} else {
this.scribe.setIndentation(switchIndentationLevel, statementIndentation);
this.scribe.printNewLine();
this.scribe.printComment();
statement.traverse(this, scope);
wasACase = false;
wasABreak = false;
}
if (statement instanceof Expression) {
/*