From 9a666fa281fe32e23790dfd6e72de6d0795c1d9d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 8 Nov 2023 13:34:35 +0800 Subject: [PATCH] Add tag related command to help command --- src/main/java/seedu/address/logic/Messages.java | 12 ++++++++---- .../seedu/address/logic/commands/AddTagCommand.java | 2 +- .../address/logic/commands/DeleteTagCommand.java | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/seedu/address/logic/Messages.java b/src/main/java/seedu/address/logic/Messages.java index 57e184b6204..0c7a5d02067 100644 --- a/src/main/java/seedu/address/logic/Messages.java +++ b/src/main/java/seedu/address/logic/Messages.java @@ -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; @@ -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", 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", DeleteEventCommand.MESSAGE_USAGE, DeleteNoteCommand.MESSAGE_USAGE, - DeletePersonCommand.MESSAGE_USAGE); + DeletePersonCommand.MESSAGE_USAGE, + DeleteTagCommand.MESSAGE_USAGE); case ClearCommand.COMMAND_WORD: return ClearCommand.MESSAGE_USAGE; diff --git a/src/main/java/seedu/address/logic/commands/AddTagCommand.java b/src/main/java/seedu/address/logic/commands/AddTagCommand.java index 1d8e52be160..01c69ceb44d 100644 --- a/src/main/java/seedu/address/logic/commands/AddTagCommand.java +++ b/src/main/java/seedu/address/logic/commands/AddTagCommand.java @@ -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 toAdd; diff --git a/src/main/java/seedu/address/logic/commands/DeleteTagCommand.java b/src/main/java/seedu/address/logic/commands/DeleteTagCommand.java index eb9f94997a9..e64b433616c 100644 --- a/src/main/java/seedu/address/logic/commands/DeleteTagCommand.java +++ b/src/main/java/seedu/address/logic/commands/DeleteTagCommand.java @@ -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: ";