@Override
    protected boolean isEnabledForCaret(@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) {
      TemplateState templateState = TemplateManagerImpl.getTemplateState(editor);
      return templateState != null && !templateState.isFinished() && templateState.isToProcessTab();
    }
@Override
    protected boolean isEnabledForCaret(@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext)