@Override
    public void undo() throws CannotUndoException {
      //  End the edit so future edits don't get absorbed by this edit

      if (compoundEdit != null) {
        compoundEdit.end();
      }

      super.undo();

      //  Always start a new compound edit after an undo

      compoundEdit = null;
    }
Example #2
0
  public void undo() throws CannotUndoException {
    restoreSelections();

    listener.finishCurrentEdit();

    if (canUndo()) {
      super.undo();
    } else {
      die();
    }

    if (adapter != null) {
      adapter.updateModel();
    }

    editor.requestFocusInWindow();
    editor.selectAll();
  }
Example #3
0
 public void undo() throws CannotUndoException {
   super.undo();
   isUnDone = true;
 }