@Override
    public void templateFinished(@NotNull Template template, boolean brokenOff) {
      boolean bind = false;
      try {
        if (!brokenOff) {
          bind = performRefactoring();
        } else {
          performCleanup();
        }
        moveOffsetAfter(!brokenOff);
      }
      finally {
        if (!bind) {
          try {
            Editor editor = InjectedLanguageEditorUtil.getTopLevelEditor(myEditor);
            if (editor instanceof EditorImpl) {
              ((EditorImpl)editor).stopDumbLater();
            }
          }
          finally {
            FinishMarkAction.finish(myProject, myEditor, myMarkAction);
            if (myBeforeRevert != null) {
              myBeforeRevert.dispose();
            }
          }
        }
      }
    }
@Override
    public void templateFinished(@NotNull Template template, boolean brokenOff)