@Override
  protected void invoke(@NotNull ActionContext context, @NotNull PsiExpressionStatement expressionStatement, @NotNull ModPsiUpdater updater) {
    String valueToSwitch = expressionStatement.getExpression().getText();
    PsiSwitchStatement switchStatement = (PsiSwitchStatement)new CommentTracker().replaceAndRestoreComments(
      expressionStatement, "switch (" + valueToSwitch + ") {}");
    CodeStyleManager.getInstance(context.project()).reformat(switchStatement);

    PsiCodeBlock body = switchStatement.getBody();
    PsiJavaToken rBrace = body == null ? null : body.getRBrace();
    if (rBrace != null) {
      updater.moveCaretTo(rBrace);
      PsiFile file = body.getContainingFile();
      Document document = file.getFileDocument();
      PsiDocumentManager.getInstance(context.project()).doPostponedOperationsAndUnblockDocument(document);
      int lineEndOffset = document.getLineEndOffset(document.getLineNumber(updater.getCaretOffset()) - 1);
      updater.moveCaretTo(lineEndOffset);
    }
  }
@Override
  protected void invoke(@NotNull ActionContext context, @NotNull PsiExpressionStatement expressionStatement, @NotNull ModPsiUpdater updater)