@Override
  public void afterTemplateStart() {
    super.afterTemplateStart();
    if (Registry.is("enable.rename.options.inplace", true)) {
      TemplateState templateState = TemplateManagerImpl.getTemplateState(myEditor);
      PsiNamedElement variable = getVariable();
      if (templateState == null || variable == null) return;
      TextRange variableRange = templateState.getCurrentVariableRange();
      if (variableRange == null) return;

      Runnable restartCallback = () -> {
        TemplateState state = TemplateManagerImpl.getTemplateState(myEditor);
        PsiNamedElement var = getVariable();
        if (state == null || var == null) return;
        String insertedName = var.getName();
        Editor editor = state.getEditor();
        state.gotoEnd(true);
        createInplaceRenamerToRestart(var, editor, insertedName).performInplaceRefactoring(new LinkedHashSet<>());
      };
      TemplateInlayUtil.createRenameSettingsInlay(templateState, variableRange.getEndOffset(), variable, restartCallback);
    }
  }
@Override
  public void afterTemplateStart()