Minor updates to the Tool Framework documentation

This commit is contained in:
Maciej Suminski 2017-02-23 09:45:43 +01:00
parent 6b39e9ea81
commit 1077b679c5
1 changed files with 7 additions and 6 deletions

View File

@ -208,9 +208,10 @@ The procedure of a commit is:
* Construct an appropriate `COMMIT` object
* Before modifying any item, add it to the commit with `Modify( item )`
so that the current item state can be stored as an undo point.
* When adding a new item, call `Add( item )`. The commit object now
owns that item, do not delete it.
* When removing an item, call `Remove( item )`.
* When adding a new item, call `Add( item )`. Do not delete the added item,
unless you are going to abort the commit.
* When removing an item, call `Remove( item )`. You should not delete the
removed item, it will be stored in the undo buffer.
* Finalise the commit with `Push( "Description" )`. If you performed
no modifications, additions or removals, this is a no-op, so you
don't need to check if you made any changes before pushing.