void (@Nullable PsiElement label) { PsiStatement lastStatementInBranch = findLastStatementInBranch(label); if (lastStatementInBranch != null && statementMayCompleteNormally(lastStatementInBranch)) { PsiElementFactory factory = JavaPsiFacade.getElementFactory(lastStatementInBranch.getProject()); PsiStatement breakStatement = factory.createStatementFromText("break;", null); myCodeBlock.addAfter(breakStatement, lastStatementInBranch); } }