void (@NotNull Project project, @NotNull PsiElement startElement, @NotNull ModPsiUpdater updater) { final PsiSwitchLabelStatement labelStatement = (PsiSwitchLabelStatement)startElement; final JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project); final PsiElementFactory factory = psiFacade.getElementFactory(); PsiSwitchBlock switchBlock = labelStatement.getEnclosingSwitchBlock(); String stmt = switchBlock instanceof PsiSwitchExpression ? "yield " + PsiTypesUtil.getDefaultValueOfType(((PsiSwitchExpression)switchBlock).getType()) + ";" : "break;"; final PsiStatement breakStatement = factory.createStatementFromText(stmt, labelStatement); final PsiElement parent = labelStatement.getParent(); parent.addBefore(breakStatement, labelStatement); }