void (PsiStatement bodyStatement, boolean wrap, boolean renameBreaks, String breakLabelName, @NonNls StringBuilder switchStatementText) { if (wrap) { switchStatementText.append('{'); } if (bodyStatement instanceof PsiBlockStatement) { final PsiCodeBlock codeBlock = ((PsiBlockStatement)bodyStatement).getCodeBlock(); final PsiElement[] children = codeBlock.getChildren(); //skip the first and last members, to unwrap the block for (int i = 1; i < children.length - 1; i++) { final PsiElement child = children[i]; appendElement(child, renameBreaks, breakLabelName, switchStatementText); } } else if (bodyStatement != null) { appendElement(bodyStatement, renameBreaks, breakLabelName, switchStatementText); } if (ControlFlowUtils.statementMayCompleteNormally(bodyStatement)) { switchStatementText.append("break;"); } if (wrap) { switchStatementText.append('}'); } }