void (PsiSwitchBlock block, List<PsiSwitchLabelStatementBase> addedLabels, ModPsiUpdater updater) { if (!(block instanceof PsiSwitchExpression)) return; List<PsiExpression> elementsToReplace = getElementsToReplace(addedLabels); ModTemplateBuilder builder = updater.templateBuilder(); for (PsiExpression expression : elementsToReplace) { builder.field(expression, new ConstantNode(expression.getText())); } }