@Override
  public void doExecute(@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) {
    final TemplateState templateState = TemplateManagerImpl.getTemplateState(editor);
    if (templateState != null && !templateState.isFinished()) {
      final TextRange range = templateState.getCurrentVariableRange();
      final int caretOffset = editor.getCaretModel().getOffset();
      if (range != null && range.getStartOffset() <= caretOffset && caretOffset <= range.getEndOffset()) {
        editor.getSelectionModel().setSelection(range.getStartOffset(), range.getEndOffset());
        return;
      }
    }
    myOriginalHandler.execute(editor, caret, dataContext);
  }
@Override
  public void doExecute(@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext)