Skip to content

Commit

Permalink
Add tag related command to help command
Browse files Browse the repository at this point in the history
  • Loading branch information
zekone committed Nov 8, 2023
1 parent b7b9c00 commit 9a666fa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions src/main/java/seedu/address/logic/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
import seedu.address.logic.commands.AddEventCommand;
import seedu.address.logic.commands.AddNoteCommand;
import seedu.address.logic.commands.AddPersonCommand;
import seedu.address.logic.commands.AddTagCommand;
import seedu.address.logic.commands.ClearCommand;
import seedu.address.logic.commands.DeleteCommand;
import seedu.address.logic.commands.DeleteEventCommand;
import seedu.address.logic.commands.DeleteNoteCommand;
import seedu.address.logic.commands.DeletePersonCommand;
import seedu.address.logic.commands.DeleteTagCommand;
import seedu.address.logic.commands.EditCommand;
import seedu.address.logic.commands.FindCommand;
import seedu.address.logic.commands.ListCommand;
Expand Down Expand Up @@ -88,19 +90,21 @@ public static String getHelpMessageForAll() {
public static String getHelpMessageForRecognizableCommand(String command) throws CommandException {
switch (command) {
case AddCommand.COMMAND_WORD:
return String.format("%s \n\n %s \n\n %s",
return String.format("%s \n\n %s \n\n %s \n\n %s",

Check warning on line 93 in src/main/java/seedu/address/logic/Messages.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/seedu/address/logic/Messages.java#L93

Added line #L93 was not covered by tests
AddEventCommand.MESSAGE_USAGE,
AddNoteCommand.MESSAGE_USAGE,
AddPersonCommand.MESSAGE_USAGE);
AddPersonCommand.MESSAGE_USAGE,
AddTagCommand.MESSAGE_USAGE);

case EditCommand.COMMAND_WORD:
return EditCommand.MESSAGE_USAGE;

case DeleteCommand.COMMAND_WORD:
return String.format("%s \n\n %s \n\n %s",
return String.format("%s \n\n %s \n\n %s \n\n %s",

Check warning on line 103 in src/main/java/seedu/address/logic/Messages.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/seedu/address/logic/Messages.java#L103

Added line #L103 was not covered by tests
DeleteEventCommand.MESSAGE_USAGE,
DeleteNoteCommand.MESSAGE_USAGE,
DeletePersonCommand.MESSAGE_USAGE);
DeletePersonCommand.MESSAGE_USAGE,
DeleteTagCommand.MESSAGE_USAGE);

case ClearCommand.COMMAND_WORD:
return ClearCommand.MESSAGE_USAGE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class AddTagCommand extends AddCommand {

public static final String MESSAGE_USAGE = COMMAND_WORD + " " + SECONDARY_COMMAND_WORD
+ ": Adds tags to a contact from the contact list.\n"
+ "Usage: add tag -id CONTACT_ID -t TAGNAME";
+ "Usage: add tag -id CONTACT_ID -t TAGNAME...";
public static final String MESSAGE_PERSON_NOT_FOUND = "Can not find the target contact with ID: ";

private final Set<Tag> toAdd;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class DeleteTagCommand extends DeleteCommand {
public static final String SECONDARY_COMMAND_WORD = "tag";
public static final String MESSAGE_USAGE = COMMAND_WORD + " "
+ SECONDARY_COMMAND_WORD + ": Delete one or more tags from a contact.\n"
+ "Usage: delete tag -id CONTACT_ID -t TAGNAME";
+ "Usage: delete tag -id CONTACT_ID -t TAGNAME...";
public static final String MESSAGE_PERSON_NOT_FOUND = "Can not find the target contact with ID: ";
public static final String MESSAGE_SUCCESS = "Successfully deleted tags: ";

Expand Down

0 comments on commit 9a666fa

Please sign in to comment.