You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

I've been looking for a nice way to implement the undo redo functionality. To do a simple undo redo you need to use the command pattern. We already have this defined in the interface. See Command pattern and ICommand interface.
To give users more room for mistakes you will want to use at least a buffered or multilevel undo-redo functionality. Therefor we also will use the memento pattern. See pattern and examples .

I also found a nice example of a tree based undo-redo functionality in the editor e. This is the windows version of textmate. See also attached screenshot.

  • No labels