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
1.`Logic` uses the `AddressBookParser` class to parse the user command.
83
+
1.`Logic` uses the `TaskTrackerParser` class to parse the user command.
84
84
1. This results in a `Command` object which is executed by the `LogicManager`.
85
85
1. The command execution can affect the `Model` (e.g. adding a person).
86
86
1. The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.
@@ -107,7 +107,7 @@ The `Model`,
107
107
* does not depend on any of the other three components.
108
108
109
109
110
-
<divmarkdown="span"class="alert alert-info">:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique `Tag`, instead of each `Person` needing their own `Tag` object.<br>
110
+
<divmarkdown="span"class="alert alert-info">:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `TaskTracker`, which `Person` references. This allows `TaskTracker` to only require one `Tag` object per unique `Tag`, instead of each `Person` needing their own `Tag` object.<br>
@@ -137,37 +137,37 @@ This section describes some noteworthy details on how certain features are imple
137
137
138
138
#### Proposed Implementation
139
139
140
-
The proposed undo/redo mechanism is facilitated by `VersionedAddressBook`. It extends `AddressBook` with an undo/redo history, stored internally as an `addressBookStateList` and `currentStatePointer`. Additionally, it implements the following operations:
140
+
The proposed undo/redo mechanism is facilitated by `VersionedTaskTracker`. It extends `TaskTracker` with an undo/redo history, stored internally as an `taskTrackerStateList` and `currentStatePointer`. Additionally, it implements the following operations:
141
141
142
-
*`VersionedAddressBook#commit()` — Saves the current address book state in its history.
143
-
*`VersionedAddressBook#undo()` — Restores the previous address book state from its history.
144
-
*`VersionedAddressBook#redo()` — Restores a previously undone address book state from its history.
142
+
*`VersionedTaskTracker#commit()` — Saves the current address book state in its history.
143
+
*`VersionedTaskTracker#undo()` — Restores the previous address book state from its history.
144
+
*`VersionedTaskTracker#redo()` — Restores a previously undone address book state from its history.
145
145
146
-
These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` and `Model#redoAddressBook()` respectively.
146
+
These operations are exposed in the `Model` interface as `Model#commitTaskTracker()`, `Model#undoTaskTracker()` and `Model#redoTaskTracker()` respectively.
147
147
148
148
Given below is an example usage scenario and how the undo/redo mechanism behaves at each step.
149
149
150
-
Step 1. The user launches the application for the first time. The `VersionedAddressBook` will be initialized with the initial address book state, and the `currentStatePointer` pointing to that single address book state.
150
+
Step 1. The user launches the application for the first time. The `VersionedTaskTracker` will be initialized with the initial address book state, and the `currentStatePointer` pointing to that single address book state.
151
151
152
152

153
153
154
-
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.
154
+
Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command calls `Model#commitTaskTracker()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `taskTrackerStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state.
155
155
156
156

157
157
158
-
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`.
158
+
Step 3. The user executes `add n/David …` to add a new person. The `add` command also calls `Model#commitTaskTracker()`, causing another modified address book state to be saved into the `taskTrackerStateList`.
159
159
160
160

161
161
162
-
<divmarkdown="span"class="alert alert-info">:information_source: **Note:** If a command fails its execution, it will not call `Model#commitAddressBook()`, so the address book state will not be saved into the `addressBookStateList`.
162
+
<divmarkdown="span"class="alert alert-info">:information_source: **Note:** If a command fails its execution, it will not call `Model#commitTaskTracker()`, so the address book state will not be saved into the `taskTrackerStateList`.
163
163
164
164
</div>
165
165
166
-
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.
166
+
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#undoTaskTracker()`, 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.
167
167
168
168

169
169
170
-
<divmarkdown="span"class="alert alert-info">:information_source: **Note:** If the `currentStatePointer` is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the case. If so, it will return an error to the user rather
170
+
<divmarkdown="span"class="alert alert-info">:information_source: **Note:** If the `currentStatePointer` is at index 0, pointing to the initial TaskTracker state, then there are no previous TaskTracker states to restore. The `undo` command uses `Model#canUndoTaskTracker()` to check if this is the case. If so, it will return an error to the user rather
171
171
than attempting to perform the undo.
172
172
173
173
</div>
@@ -180,17 +180,17 @@ The following sequence diagram shows how the undo operation works:
180
180
181
181
</div>
182
182
183
-
The `redo` command does the opposite — it calls `Model#redoAddressBook()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state.
183
+
The `redo` command does the opposite — it calls `Model#redoTaskTracker()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state.
184
184
185
-
<divmarkdown="span"class="alert alert-info">:information_source: **Note:** If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address book state, then there are no undone AddressBook states to restore. The `redo` command uses `Model#canRedoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.
185
+
<divmarkdown="span"class="alert alert-info">:information_source: **Note:** If the `currentStatePointer` is at index `taskTrackerStateList.size() - 1`, pointing to the latest address book state, then there are no undone TaskTracker states to restore. The `redo` command uses `Model#canRedoTaskTracker()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.
186
186
187
187
</div>
188
188
189
-
Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. Thus, the `addressBookStateList` remains unchanged.
189
+
Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such as `list`, will usually not call `Model#commitTaskTracker()`, `Model#undoTaskTracker()` or `Model#redoTaskTracker()`. Thus, the `taskTrackerStateList` remains unchanged.
190
190
191
191

192
192
193
-
Step 6. The user executes `clear`, which calls `Model#commitAddressBook()`. Since the `currentStatePointer` is not pointing at the end of the `addressBookStateList`, all address book states after the `currentStatePointer` will be purged. Reason: It no longer makes sense to redo the `add n/David …` command. This is the behavior that most modern desktop applications follow.
193
+
Step 6. The user executes `clear`, which calls `Model#commitTaskTracker()`. Since the `currentStatePointer` is not pointing at the end of the `taskTrackerStateList`, all address book states after the `currentStatePointer` will be purged. Reason: It no longer makes sense to redo the `add n/David …` command. This is the behavior that most modern desktop applications follow.
194
194
195
195

196
196
@@ -274,16 +274,16 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
274
274
275
275
### Use cases
276
276
277
-
(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise)
277
+
(For all use cases below, the **System** is the `TaskTracker` and the **Actor** is the `user`, unless specified otherwise)
278
278
279
279
**Use case: Delete a deadline**
280
280
281
281
**MSS**
282
282
283
283
1. User requests to list deadlines
284
-
2.AddressBook shows a list of deadlines
284
+
2.TaskTracker shows a list of deadlines
285
285
3. User requests to delete a specific deadline in the list
286
-
4.AddressBook deletes the deadline
286
+
4.TaskTracker deletes the deadline
287
287
288
288
Use case ends.
289
289
@@ -295,16 +295,16 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
295
295
296
296
* 3a. The given index is invalid.
297
297
298
-
* 3a1. AddressBook shows an error message.
298
+
* 3a1. TaskTracker shows an error message.
299
299
300
300
Use case resumes at step 2.
301
301
302
302
**Use case: Edit a deadline**
303
303
304
304
1. User requests to list deadlines
305
-
2.AddressBook shows a list of deadlines
305
+
2.TaskTracker shows a list of deadlines
306
306
3. User requests to edit a specific deadline in the list
307
-
4.AddressBook updates the specific deadline in the list
307
+
4.TaskTracker updates the specific deadline in the list
308
308
309
309
Use case ends.
310
310
@@ -314,55 +314,55 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
314
314
315
315
Use case ends.
316
316
* 3a. The given index is invalid
317
-
* 3a1. AddressBook shows an error message.
317
+
* 3a1. TaskTracker shows an error message.
318
318
319
319
Use case resumes at step 2.
320
320
* 3b. Optional fields are not provided
321
-
* 3b1. AddressBook shows an error message
321
+
* 3b1. TaskTracker shows an error message
322
322
323
323
Use case resumes at step 2.
324
324
325
325
**Use case: Setting a priority tag**
326
326
327
327
1. User requests to list deadlines
328
-
2.AddressBook shows a list of deadlines**
328
+
2.TaskTracker shows a list of deadlines**
329
329
3. User requests to set a priority tag on a specific deadline in the list
330
-
4.AddressBook sets a priority tag to the specific deadline in the list
330
+
4.TaskTracker sets a priority tag to the specific deadline in the list
331
331
332
332
**Extensions**
333
333
334
334
* 2a. The list is empty.
335
335
336
336
Use case ends.
337
337
* 3a. The given index is invalid
338
-
* 3a1. AddressBook shows an error message
338
+
* 3a1. TaskTracker shows an error message
339
339
340
340
Use case resumes at step 2
341
341
* 3b. The given priority tag is invalid
342
-
* 3b1. AddressBook shows an error message
342
+
* 3b1. TaskTracker shows an error message
343
343
344
344
Use case resumes at step 2
345
345
346
346
**Use case: Adding notes to a deadline**
347
347
348
348
1. User requests to list deadlines
349
-
2.AddressBook shows a list of deadlines**
349
+
2.TaskTracker shows a list of deadlines**
350
350
3. User requests to add a note to a specific deadline in the list
351
-
4.AddressBook adds a note to the specific deadline in the list
351
+
4.TaskTracker adds a note to the specific deadline in the list
352
352
353
353
**Extensions**
354
354
355
355
* 2a. The list is empty.
356
356
357
357
Use case ends
358
358
* 3a. The given index is invalids
359
-
* 3a1. AddressBook shows an error message
359
+
* 3a1. TaskTracker shows an error message
360
360
361
361
Use case resumes at step 2
362
362
* 3b. The deadline has existing notes
363
-
* 3b1. AddressBook requests for confirmation to overwrite previous notes
363
+
* 3b1. TaskTracker requests for confirmation to overwrite previous notes
364
364
* 3b2. User confirms the request to overwrite previous notes
365
-
* 3b3. AddressBook overwrites the previous notes with a new note
365
+
* 3b3. TaskTracker overwrites the previous notes with a new note
0 commit comments