void (PsiElement element, boolean renameBreakElements, String breakLabelString, @NonNls StringBuilder switchStatementText) { final String text = element.getText(); if (!renameBreakElements) { switchStatementText.append(text); } else if (element instanceof PsiBreakStatement) { final PsiIdentifier labelIdentifier = ((PsiBreakStatement)element).getLabelIdentifier(); if (labelIdentifier == null) { PsiElement child = element.getFirstChild(); switchStatementText.append(child.getText()).append(" ").append(breakLabelString); child = child.getNextSibling(); while (child != null) { switchStatementText.append(child.getText()); child = child.getNextSibling(); } return; } else { switchStatementText.append(text); } } else if (element instanceof PsiBlockStatement || element instanceof PsiCodeBlock || element instanceof PsiIfStatement) { final PsiElement[] children = element.getChildren(); for (final PsiElement child : children) { appendElement(child, true, breakLabelString, switchStatementText); } } else { switchStatementText.append(text); } final PsiElement lastChild = element.getLastChild(); if (lastChild instanceof PsiComment && ((PsiComment)lastChild).getTokenType() == JavaTokenType.END_OF_LINE_COMMENT) { switchStatementText.append('\n'); } }