You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
. `Logic` uses the `AddressBookParser` class to parse the user command.
102
102
. This results in a `Command` object which is executed by the `LogicManager`.
103
-
. The command execution can affect the `Model` (e.g. adding a person).
103
+
. The command execution can affect the `Model` (e.g. adding a recipe).
104
104
. The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.
105
105
. In addition, the `CommandResult` object can also instruct the `Ui` to perform certain actions, such as displaying help to the user.
106
106
@@ -173,18 +173,18 @@ Step 1. The user launches the application for the first time. The `VersionedAddr
173
173
174
174
image::UndoRedoState0.png[]
175
175
176
-
Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state.
176
+
Step 2. The user executes `delete 5` command to delete the 5th recipe in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state.
177
177
178
178
image::UndoRedoState1.png[]
179
179
180
-
Step 3. The user executes `add n/David ...` to add a new person. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`.
180
+
Step 3. The user executes `add n/David ...` to add a new recipe. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`.
181
181
182
182
image::UndoRedoState2.png[]
183
183
184
184
[NOTE]
185
185
If a command fails its execution, it will not call `Model#commitAddressBook()`, so the address book state will not be saved into the `addressBookStateList`.
186
186
187
-
Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state.
187
+
Step 4. The user now decides that adding the recipe was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state.
* Changes the remark of an existing person in the address book.
44
+
* Changes the remark of an existing recipe in the address book.
45
45
*/
46
46
public class RemarkCommand extends Command {
47
47
@@ -82,8 +82,8 @@ Following the convention in other commands, we add relevant messages as constant
82
82
.RemarkCommand.java
83
83
[source, java]
84
84
----
85
-
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the remark of the person identified "
86
-
+ "by the index number used in the last person listing. "
85
+
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the remark of the recipe identified "
86
+
+ "by the index number used in the last recipe listing. "
87
87
+ "Existing remark will be overwritten by the input.\n"
88
88
+ "Parameters: INDEX (must be a positive integer) "
89
89
+ "r/ [REMARK]\n"
@@ -120,8 +120,8 @@ public class RemarkCommand extends Command {
120
120
private final String remark;
121
121
122
122
/**
123
-
* @param index of the person in the filtered person list to edit the remark
124
-
* @param remark of the person to be updated to
123
+
* @param index of the recipe in the filtered recipe list to edit the remark
124
+
* @param remark of the recipe to be updated to
125
125
*/
126
126
public RemarkCommand(Index index, String remark) {
127
127
requireAllNonNull(index, remark);
@@ -246,12 +246,12 @@ If you are stuck, check out the sample link:https://github.com/nus-cs2103-AY1920
246
246
247
247
Now that we have all the information that we need, let's lay the groundwork for some _persistent_ changes.
248
248
We achieve that by working with the `Person` model.
249
-
Each field in a Person is implemented as a separate class (e.g. a `Name` object represents the person's name).
250
-
That means we should add a `Remark` class so that we can use a `Remark` object to represent a remark given to a person.
249
+
Each field in a Person is implemented as a separate class (e.g. a `Name` object represents the recipe's name).
250
+
That means we should add a `Remark` class so that we can use a `Remark` object to represent a remark given to a recipe.
251
251
252
252
=== Add a new `Remark` class
253
253
254
-
Create a new `Remark` in `seedu.address.model.person`. Since a `Remark` is a field that is similar to `Address`, we can reuse a significant bit of code.
254
+
Create a new `Remark` in `recipe`. Since a `Remark` is a field that is similar to `Address`, we can reuse a significant bit of code.
255
255
256
256
A copy-paste and search-replace later, you should have something like link:https://github.com/nus-cs2103-AY1920S1/addressbook-level3/commit/b7a47c50c8e5f0430d343a23d2863446b6ce9298#diff-af2f075d24dfcd333876f0fbce321f25[this].
257
257
Note how `Remark` has no constrains and thus does not require input validation.
@@ -263,7 +263,7 @@ These should be relatively simple changes.
263
263
264
264
== Add a placeholder element for remark to the UI
265
265
266
-
Without getting too deep into `fxml`, let's go on a 5 minute adventure to get some placeholder text to show up for each person.
266
+
Without getting too deep into `fxml`, let's go on a 5 minute adventure to get some placeholder text to show up for each recipe.
267
267
268
268
Simply add
269
269
[source, java]
@@ -326,9 +326,9 @@ Just add link:https://github.com/nus-cs2103-AY1920S1/addressbook-level3/commit/5
326
326
[source, java]
327
327
.PersonCard.java
328
328
----
329
-
public PersonCard(Person person, int displayedIndex) {
329
+
public PersonCard(Person recipe, int displayedIndex) {
0 commit comments