diff --git a/docs/DeveloperGuide.adoc b/docs/DeveloperGuide.adoc index 2bd78b2ad03e..3ad138a384fd 100644 --- a/docs/DeveloperGuide.adoc +++ b/docs/DeveloperGuide.adoc @@ -163,6 +163,9 @@ Author: Bernard Choo image::LogicClassDiagram.png[width="800"] _Figure 2.3.1 : Structure of the Logic Component_ +image::LogicCommandClassDiagram.png[width="800"] +_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_ + *API* : link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`] diff --git a/docs/UserGuide.adoc b/docs/UserGuide.adoc index b95942a51133..c86770904a4e 100644 --- a/docs/UserGuide.adoc +++ b/docs/UserGuide.adoc @@ -112,7 +112,7 @@ Returns Any person having names `Betsy`, `Tim`, or `John` === Deleting a person : `delete` -Deletes the specified person from the address book. Irreversible. + +Deletes the specified person from the address book. + Format: `delete INDEX` **** @@ -160,6 +160,54 @@ Format: `history` Pressing the kbd:[↑] and kbd:[↓] arrows will display the previous and next input respectively in the command box. ==== +=== Undo previous command : `undo` + +Restores the address book to the state before the previous _undoable_ command was executed. + +Format: `undo` + +[NOTE] +==== +Undoable commands: those commands that modify the address book's content (`add`, `delete`, `edit` and `clear`). +==== + +Examples: + +* `delete 1` + +`list` + +`undo` (reverses the `delete 1` command) + + +* `select 1` + +`list` + +`undo` + +The `undo` command fails as there are no undoable commands executed previously. + +* `delete 1` + +`clear` + +`undo` (reverses the `clear` command) + +`undo` (reverses the `delete 1` command) + + +=== Redo the previously undone command : `redo` + +Reverses the most recent `undo` command. + +Format: `redo` + +Examples: + +* `delete 1` + +`undo` (reverses the `delete 1` command) + +`redo` (reapplies the `delete 1` command) + + +* `delete 1` + +`redo` + +The `redo` command fails as there are no `undo` commands executed previously. + +* `delete 1` + +`clear` + +`undo` (reverses the `clear` command) + +`undo` (reverses the `delete 1` command) + +`redo` (reapplies the `delete 1` command) + +`redo` (reapplies the `clear` command) + + === Clearing all entries : `clear` Clears all entries from the address book. + @@ -194,3 +242,5 @@ e.g. `find James Jake` * *Select* : `select INDEX` + e.g.`select 2` * *History* : `history` +* *Undo* : `undo` +* *Redo* : `redo` diff --git a/docs/diagrams/LogicComponentClassDiagram.pptx b/docs/diagrams/LogicComponentClassDiagram.pptx index 5dac25ed8532..e38e3de020a3 100644 Binary files a/docs/diagrams/LogicComponentClassDiagram.pptx and b/docs/diagrams/LogicComponentClassDiagram.pptx differ diff --git a/docs/diagrams/LogicComponentCommandClassDiagram.pptx b/docs/diagrams/LogicComponentCommandClassDiagram.pptx new file mode 100644 index 000000000000..50631ba75bf0 Binary files /dev/null and b/docs/diagrams/LogicComponentCommandClassDiagram.pptx differ diff --git a/docs/images/LogicClassDiagram.png b/docs/images/LogicClassDiagram.png index f776af25626b..e0b17014bb47 100644 Binary files a/docs/images/LogicClassDiagram.png and b/docs/images/LogicClassDiagram.png differ diff --git a/docs/images/LogicCommandClassDiagram.png b/docs/images/LogicCommandClassDiagram.png new file mode 100644 index 000000000000..09d61cc1b401 Binary files /dev/null and b/docs/images/LogicCommandClassDiagram.png differ