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
Copy file name to clipboardExpand all lines: docs/DeveloperGuide.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -494,8 +494,37 @@ The following activity diagram shows the logic of the `help` command.
494
494
495
495
**Overview:**
496
496
497
+
The `add-t` command is used to add additional tags to an existing `Person` in ConnectUS specified by the user.
498
+
499
+
The format for the `add-t` command can be found [here](https://ay2223s2-cs2103t-w15-1.github.io/tp/UserGuide.html#46-adding-additional-tags-to-a-contact-add-t).
500
+
501
+
<divstyle="page-break-after: always"></div>
502
+
497
503
**Feature Details:**
498
504
505
+
1. The user specifies a person index that represents a `Person` to be edited, followed by the tag to be added.
506
+
2. If a negative or zero index is provided, an error is thrown. The user is prompted to re-enter the command correctly.
507
+
3. If the index is not in valid range of the contact list provided, an error is thrown. The user is prompted to re-enter the command correctly.
508
+
4. The `Person` is cross-referenced in the `Model` to check if it already exists. If it does, then an error is raised as feedback to the user.
509
+
5. If step 5 completes without exceptions, the new `Person` will be successfully edited and stored inside the contact list.
510
+
511
+
The following activity diagram shows the logic of the `add-t` command.
The sequence of the `add-t` command is as follows:
516
+
517
+
1. The command `add-t INPUT` is entered by the user, where the `INPUT` is an integer index followed by a tag to add (e.g. `add-t 1 r/friend`).
518
+
2.`Logic Manager` calls the `ConnectUsParser#parseCommand` with the given `INPUT`
519
+
3.`ConnectUsParser` parses the command word. creating an instance of `AddTagToPersonCommandParser` to `parse` the tags via the respective `ParserUtil` functions.
520
+
4.`AddTagToPersonCommandParser` creates the corresponding `AddTagDescriptor` object. This `AddTagDescriptor` object is taken as the input of a new `AddTagToPersonCommand` object created by `AddTagToPersonCommandParser`.
521
+
5.`Logic Manager` executes `AddTagToPersonCommand#execute`, creating a `Person` from the aforementioned`AddTagDescriptor` object and adding this `Person` to the model through `Model#setPerson`.
522
+
6.`Model#updateFilteredPersonList` is called to update the list of `Person` objects.
523
+
7. A `Command Result` is returned with the result of the execution.
524
+
525
+
The following sequence diagram shows how `add-t` works:
@@ -507,8 +536,38 @@ The following activity diagram shows the logic of the `help` command.
507
536
508
537
**Overview:**
509
538
539
+
The `delete-t` command is used to delete individual tags from an existing `Person` in ConnectUS specified by the user.
540
+
541
+
The format for the `delete-t` command can be found [here](https://ay2223s2-cs2103t-w15-1.github.io/tp/UserGuide.html#47-deleting-tags-from-a-contact-delete-t).
542
+
543
+
<divstyle="page-break-after: always"></div>
544
+
510
545
**Feature Details:**
511
546
547
+
1. The user specifies a person index that represents a `Person` to be edited, followed by the tag index to be deleted.
548
+
2. If a negative or zero index is provided, an error is thrown. The user is prompted to re-enter the command correctly.
549
+
3. If the index is not in valid range of the contact list provided, an error is thrown. The user is prompted to re-enter the command correctly.
550
+
4. The `Person` is cross-referenced in the `Model` to check if it already exists. If it does, then an error is raised as feedback to the user.
551
+
5. If step 5 completes without exceptions, the tag of `Person` will be successfully deleted and this change will be stored inside the contact list.
552
+
553
+
The following activity diagram shows the logic of the `delete-t` command.
The sequence of the `delete-t` command is as follows:
558
+
559
+
1. The command `delete-t INPUT` is entered by the user, where the `INPUT` is an integer index followed by a tag index to delete (e.g. `delete-t 1 r/1`).
560
+
2.`Logic Manager` calls the `ConnectUsParser#parseCommand` with the given `INPUT`
561
+
3.`ConnectUsParser` parses the command word. creating an instance of `DeleteTagFromPersonCommandParser` to `parse` the tags via the respective `ParserUtil` functions.
562
+
4.`DeleteTagFromPersonCommandParser` parses the corresponding tag indices. They are taken as the constructor arguments of a new `DeleteTagFromPersonCommand` object.
563
+
5.`Logic Manager` executes `DeleteTagFromPersonCommand#execute`, creating a new `Person` with new tag lists from its parameters and replacing the original `Person` with this new `Person` in the model through `Model#setPerson`.
564
+
6.`Model#updateFilteredPersonList` is called to update the list of `Person` objects.
565
+
7. A `Command Result` is returned with the result of the execution.
566
+
567
+
The following sequence diagram shows how `delete-t` works:
0 commit comments