public static void startTemplateOnStatement(@Nullable PsiStatement statementToAdjust, @NotNull ModPsiUpdater updater) {
    if (statementToAdjust == null) return;
    PsiSwitchBlock block = PsiTreeUtil.getParentOfType(statementToAdjust, PsiSwitchBlock.class);
    if (block == null) return;
    PsiCodeBlock body = block.getBody();
    if (body == null) return;
    if (statementToAdjust instanceof PsiSwitchLabeledRuleStatement rule) {
      statementToAdjust = rule.getBody();
    }
    if (statementToAdjust != null) {
      updater.templateBuilder().field(statementToAdjust, statementToAdjust.getText());
    }
  }
public static void startTemplateOnStatement(@Nullable PsiStatement statementToAdjust, @NotNull ModPsiUpdater updater)