private void prepareAndExpandForChooseExpression(@NotNull PsiElement element, @NotNull Editor editor) {
    ApplicationManager.getApplication().runWriteAction(
      () -> CommandProcessor.getInstance().executeCommand(
        element.getProject(), () -> expandForChooseExpression(element, editor), CodeInsightBundle.message("command.expand.postfix.template"),
        PostfixLiveTemplate.POSTFIX_TEMPLATE_ID));
  }
private void prepareAndExpandForChooseExpression(@NotNull PsiElement element, @NotNull Editor editor)