Skip to content

Commit

Permalink
feat: Add aliases in message usage strings
Browse files Browse the repository at this point in the history
  • Loading branch information
HugeNoob committed Oct 27, 2023
1 parent 2282e2f commit 9139eb1
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public class AddPersonCommand extends Command {
public static final String COMMAND_WORD = "addPerson";
public static final String SHORTENED_COMMAND_WORD = "ap";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book. "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Adds a person to the address book.\n"
+ "Parameters: "
+ PREFIX_NAME + "NAME "
+ PREFIX_PHONE + "PHONE "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public class AddTaskCommand extends Command {
public static final String COMMAND_WORD = "addTask";
public static final String SHORTENED_COMMAND_WORD = "at";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a task to the address book. "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Adds a task to the address book.\n"
+ "Parameters: "
+ PREFIX_TASK_TITLE + "TITLE "
+ PREFIX_TASK_NOTE + "NOTE "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class DeletePersonCommand extends Command {
public static final String COMMAND_WORD = "deletePerson";
public static final String SHORTENED_COMMAND_WORD = "dp";

public static final String MESSAGE_USAGE = COMMAND_WORD
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Deletes the person identified by the index number used in the displayed person list.\n"
+ "Parameters: INDEX (must be a positive integer)\n"
+ "Example: " + COMMAND_WORD + " 1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class DeleteTaskCommand extends Command {
public static final String COMMAND_WORD = "deleteTask";
public static final String SHORTENED_COMMAND_WORD = "dt";

public static final String MESSAGE_USAGE = COMMAND_WORD
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Deletes the task identified by the index number used in the displayed task list.\n"
+ "Parameters: INDEX (must be a positive integer)\n"
+ "Example: " + COMMAND_WORD + " 1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public class EditPersonCommand extends Command {
public static final String COMMAND_WORD = "editPerson";
public static final String SHORTENED_COMMAND_WORD = "ep";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the details of the person identified "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Edits the details of the person identified "
+ "by the index number used in the displayed person list. "
+ "Existing values will be overwritten by the input values.\n"
+ "Parameters: INDEX (must be a positive integer) "
Expand Down Expand Up @@ -140,7 +141,8 @@ public static class EditPersonDescriptor {
private Address address;
private Set<Tag> tags;

public EditPersonDescriptor() {}
public EditPersonDescriptor() {
}

/**
* Copy constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class EditTaskCommand extends Command {
public static final String COMMAND_WORD = "editTask";
public static final String SHORTENED_COMMAND_WORD = "et";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the details of the task identified "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Edits the details of the task identified "
+ "by the index number used in the displayed task list. "
+ "Existing values will be overwritten by the input values.\n"
+ "Parameters: INDEX (must be a positive integer) "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public class FindDoneCommand extends Command {
public static final String COMMAND_WORD = "findDone";
public static final String SHORTENED_COMMAND_WORD = "fd";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all tasks whose status is marked as "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Finds all tasks whose status is marked as "
+ "done and displays them as a list with index numbers.\n"
+ "Example: " + COMMAND_WORD;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public class FindNotDoneCommand extends Command {
public static final String COMMAND_WORD = "findNotDone";
public static final String SHORTENED_COMMAND_WORD = "fnd";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all tasks whose status is marked as "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Finds all tasks whose status is marked as "
+ "not done and displays them as a list with index numbers.\n"
+ "Example: " + COMMAND_WORD;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public class FindPersonCommand extends Command {
public static final String COMMAND_WORD = "findPerson";
public static final String SHORTENED_COMMAND_WORD = "fp";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose names contain any of "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Finds all persons whose names contain any of "
+ "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
+ "Example: " + COMMAND_WORD + " alice bob charlie";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public class FindTagCommand extends Command {
public static final String COMMAND_WORD = "findTag";
public static final String SHORTENED_COMMAND_WORD = "ftag";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons and tasks whose tag contain any of "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Finds all persons and tasks whose tag contain any of "
+ "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
+ "Example: " + COMMAND_WORD + " agenda";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public class FindTaskCommand extends Command {
public static final String COMMAND_WORD = "findTask";
public static final String SHORTENED_COMMAND_WORD = "ft";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all tasks whose title or note contain any of "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Finds all tasks whose title or note contain any of "
+ "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
+ "Example: " + COMMAND_WORD + " agenda budget";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public class MarkTaskCommand extends Command {
public static final String COMMAND_WORD = "markTask";
public static final String SHORTENED_COMMAND_WORD = "mt";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Mark status as done for the task specified "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Mark status as done for the task specified "
+ "by the index number used in the displayed task list.\n"
+ "Parameters: INDEX (must be a positive integer)\n"
+ "Example: " + COMMAND_WORD + " 1 ";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public class UnmarkTaskCommand extends Command {
public static final String COMMAND_WORD = "unmarkTask";
public static final String SHORTENED_COMMAND_WORD = "ut";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Mark status as not done for the task specified "
public static final String MESSAGE_USAGE = COMMAND_WORD + " (alias: " + SHORTENED_COMMAND_WORD + ")"
+ ": Mark status as not done for the task specified "
+ "by the index number used in the displayed task list.\n"
+ "Parameters: INDEX (must be a positive integer)\n"
+ "Example: " + COMMAND_WORD + " 1 ";
Expand Down

0 comments on commit 9139eb1

Please sign in to comment.