@Override
    public void templateCancelled(Template template) {
      try {
        PsiDocumentManager documentManager = PsiDocumentManager.getInstance(myProject);
        documentManager.commitAllDocuments();
        finish(false);
        moveOffsetAfter(false);
      }
      finally {
        FinishMarkAction.finish(myProject, myEditor, myMarkAction);
      }
    }
@Override
    public void templateCancelled(Template template)