Skip to content

Commit

Permalink
Merge branch 'master' into branch-addPageBreaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Incogdino authored Nov 7, 2024
2 parents 0e42e7d + 399caba commit 98b91f9
Show file tree
Hide file tree
Showing 17 changed files with 60 additions and 46 deletions.
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/logic/commands/AddCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public class AddCommand extends Command {

public static final String COMMAND_WORD = "add";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book.\n"
public static final String MESSAGE_USAGE = "Adds a person to the address book.\n"
+ "Command: " + COMMAND_WORD + "\n"
+ "Parameters: "
+ PREFIX_NAME + "NAME "
+ PREFIX_EMAIL + "EMAIL "
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/seedu/address/logic/commands/AddGradeCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
public class AddGradeCommand extends Command {
public static final String COMMAND_WORD = "addGrade";
public static final String COMMAND_WORD_SHORT_FORM = "ag";
public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Adds a grade of an assignment to the person.\n"
public static final String MESSAGE_USAGE =
"Adds a grade of an assignment to the person.\n"
+ "Command: " + COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM + "\n"
+ "Parameters: "
+ PREFIX_NAME
+ "NAME "
Expand All @@ -47,11 +48,11 @@ public class AddGradeCommand extends Command {
+ "Example: "
+ COMMAND_WORD_SHORT_FORM
+ " "
+ PREFIX_NAME
+ PREFIX_NAME.getShortPrefix()
+ "John Doe "
+ PREFIX_ASSIGNMENT
+ PREFIX_ASSIGNMENT.getShortPrefix()
+ "Ex01 "
+ PREFIX_SCORE
+ PREFIX_SCORE.getShortPrefix()
+ "9";
public static final String COMMAND_WORD_LOWER_CASE = "addgrade";
public static final String MESSAGE_SUCCESS = "New assignment added: %1$s";
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/seedu/address/logic/commands/ClearCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public class ClearCommand extends Command {

public static final String COMMAND_WORD = "clear";
public static final String MESSAGE_SUCCESS = "Address book has been cleared!";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Clears all entries from the address book.\n";
public static final String MESSAGE_USAGE = "Clears all entries from the address book.\n"
+ "Command: " + COMMAND_WORD + "\n"
+ "Example: " + "clear";

@Override
public CommandResult execute(Model model) {
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/seedu/address/logic/commands/DeleteCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ public class DeleteCommand extends Command {
public static final String COMMAND_WORD = "delete";
public static final String COMMAND_WORD_SHORT_FORM = "rm";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Deletes the person identified by the name shown in the displayed person list.\n"
public static final String MESSAGE_USAGE =
"Deletes the person identified by the name shown in the displayed person list.\n"
+ "Command: " + COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM + "\n"
+ "Parameters: "
+ PREFIX_NAME + "NAME\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " "
+ PREFIX_NAME + "John Doe";
+ PREFIX_NAME.getShortPrefix() + "John Doe";

public static final String MESSAGE_DELETE_PERSON_SUCCESS = "Deleted Person: %1$s";

Expand Down
11 changes: 6 additions & 5 deletions src/main/java/seedu/address/logic/commands/EditCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ public class EditCommand extends Command {

public static final String COMMAND_WORD_SHORT_FORM = "e";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Edits the details of the person identified "
public static final String MESSAGE_USAGE =
"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"
+ "Command: " + COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM + "\n"
+ "Parameters: INDEX (must be a positive integer) "
+ "[" + PREFIX_NAME + "NAME] "
+ "[" + PREFIX_EMAIL + "EMAIL] "
Expand All @@ -54,9 +55,9 @@ public class EditCommand extends Command {
+ PREFIX_GITHUB + "john123 "
+ PREFIX_TELEGRAM + "@johnDoe\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " 1 "
+ PREFIX_EMAIL + "[email protected] "
+ PREFIX_GITHUB + "john123 "
+ PREFIX_TELEGRAM + "@johnDoe";
+ PREFIX_EMAIL.getShortPrefix() + "[email protected] "
+ PREFIX_GITHUB.getShortPrefix() + "john123 "
+ PREFIX_TELEGRAM.getShortPrefix() + "@johnDoe";


public static final String MESSAGE_EDIT_PERSON_SUCCESS = "Edited Person: %1$s";
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/seedu/address/logic/commands/ExitCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ public class ExitCommand extends Command {
public static final String COMMAND_WORD = "exit";

public static final String MESSAGE_EXIT_ACKNOWLEDGEMENT = "Exiting Address Book as requested ...";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Exits the program.\n";

public static final String MESSAGE_USAGE = "Exits the program.\n"
+ "Command: " + COMMAND_WORD + "\n"
+ "Example: " + "exit";
@Override
public CommandResult execute(Model model) {
return new CommandResult(MESSAGE_EXIT_ACKNOWLEDGEMENT, false, true);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/seedu/address/logic/commands/FilterCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ public class FilterCommand extends Command {
public static final String COMMAND_WORD = "filter";
public static final String COMMAND_WORD_SHORT_FORM = "f";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Filter the list to show all contacts whose tag "
public static final String MESSAGE_USAGE = "Filter the list to show all contacts whose tag "
+ "contain any of the specified keywords (case-insensitive) and displays them as a list with index "
+ "numbers.\n"
+ "Command: " + COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM + "\n"
+ "Parameters: " + PREFIX_TAG + "TAG" + " [" + PREFIX_TAG + "MORE_TAG]...\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_TAG + "student "
+ PREFIX_TAG + "T02\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " "
+ PREFIX_TAG + "student "
+ PREFIX_TAG + "T02";
+ PREFIX_TAG.getShortPrefix() + "student "
+ PREFIX_TAG.getShortPrefix() + "T02";

private final TagContainsKeywordsPredicate predicate;

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/seedu/address/logic/commands/FindCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ public class FindCommand extends Command {

public static final String COMMAND_WORD_SHORT_FORM = "fd";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Finds all persons whose names contain any one of "
public static final String MESSAGE_USAGE =
"Finds all persons whose names contain any one of "
+ "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n"
+ "Command: " + COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM + "\n"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
+ "Example: " + COMMAND_WORD + " alice bob charlie\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " alice bob charlie";
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/seedu/address/logic/commands/GitHubCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ public class GitHubCommand extends Command {

public static final String COMMAND_WORD_SHORT_FORM = "git";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Launches the github repository of the user.\n"
public static final String MESSAGE_USAGE =
"Launches the github repository of the user.\n"
+ "Command: " + COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM + "\n"
+ "Parameters: "
+ PREFIX_NAME + "NAME\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " "
+ PREFIX_NAME + "John Doe";
+ PREFIX_NAME.getShortPrefix() + "John Doe";
public static final String MISSING_PERSON_EXCEPTION = "The person you specified does not exist"
+ " in the address book.\n"
+ "Parameters: "
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/seedu/address/logic/commands/HelpCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ public class HelpCommand extends Command {

public static final String COMMAND_WORD = "help";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Shows program usage instructions.\n"
+ "Example: " + COMMAND_WORD;
public static final String MESSAGE_USAGE = "Shows program usage instructions.\n"
+ "Command: " + COMMAND_WORD + "\n"
+ "Example: " + COMMAND_WORD;

public static final String SHOWING_HELP_MESSAGE = "Opened help window.";

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/seedu/address/logic/commands/ListCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public class ListCommand extends Command {
public static final String COMMAND_WORD = "list";

public static final String MESSAGE_SUCCESS = "Listed all persons";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Displays all persons in the address book.\n";
public static final String MESSAGE_USAGE = "Displays all persons in the address book.\n"
+ "Command: " + COMMAND_WORD + "\n"
+ "Example: " + "list";

@Override
public CommandResult execute(Model model) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/seedu/address/logic/commands/MarkCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ public class MarkCommand extends Command {

public static final String COMMAND_WORD_SHORT_FORM = "m";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Marks the name as present for that particular "
public static final String MESSAGE_USAGE = "Marks the name as present for that particular "
+ "week. The max week number is 13.\n"
+ "Command: " + COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM + "\n"
+ "Parameters: " + PREFIX_NAME + "NAME " + PREFIX_WEEK + "WEEK_NUMBER\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_WEEK + "1\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_WEEK + "1";
+ PREFIX_NAME.getShortPrefix() + "John Doe "
+ PREFIX_WEEK.getShortPrefix() + "1";

public final int week;
private final Name name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class RemoveGradeCommand extends Command {
public static final String COMMAND_WORD_SHORT_FORM = "rg";

public static final String MESSAGE_USAGE =
COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Removes a grade of an assignment from the person.\n"
"Removes a grade of an assignment from the person.\n"
+ "Command: " + COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM + "\n"
+ "Parameters: "
+ PREFIX_NAME
+ "NAME "
Expand All @@ -50,9 +50,9 @@ public class RemoveGradeCommand extends Command {
+ "Example: "
+ COMMAND_WORD_SHORT_FORM
+ " "
+ PREFIX_NAME
+ PREFIX_NAME.getShortPrefix()
+ "John Doe "
+ PREFIX_ASSIGNMENT
+ PREFIX_ASSIGNMENT.getShortPrefix()
+ "Ex01";

public static final String MESSAGE_SUCCESS = "Assignment %1$s removed from %2$s";
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/logic/commands/SortCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ public class SortCommand extends Command {

public static final String COMMAND_WORD = "sort";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Sorts the current list based on the specified field "
public static final String MESSAGE_USAGE = "Sorts the current list based on the specified field "
+ "and order.\n"
+ "Command: " + COMMAND_WORD + "\n"
+ "To reset the sorted order: " + COMMAND_WORD + " reset\n"
+ "Parameters: " + "FIELD " + PREFIX_SORTORDER + "ORDER\n"
+ "Acceptable value for FIELD: github, name, telegram\n"
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/seedu/address/logic/commands/UnmarkCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ public class UnmarkCommand extends Command {

public static final String COMMAND_WORD_SHORT_FORM = "um";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Unmarks the name as present for that particular "
+ "week.\n"
public static final String MESSAGE_USAGE = "Unmarks the name as present for that particular week.\n"
+ "Command: " + COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM + "\n"
+ "Parameters: " + PREFIX_NAME + "NAME " + PREFIX_WEEK + "WEEK_NUMBER\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_WEEK + "1\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_WEEK + "1";
+ PREFIX_NAME.getShortPrefix() + "John Doe "
+ PREFIX_WEEK.getShortPrefix() + "1";

public final int week;
private final Name name;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/seedu/address/logic/commands/ViewCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class ViewCommand extends Command {

public static final String COMMAND_WORD_SHORT_FORM = "v";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Views details of a contact.\n"
public static final String MESSAGE_USAGE = "Views details of a contact.\n"
+ "Command: " + COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM + "\n"
+ "Parameters: "
+ PREFIX_NAME
+ "NAME\n"
Expand All @@ -31,7 +31,7 @@ public class ViewCommand extends Command {
+ "Example: "
+ COMMAND_WORD_SHORT_FORM
+ " "
+ PREFIX_NAME + "John Doe";
+ PREFIX_NAME.getShortPrefix() + "John Doe";

public static final String VIEW_ACKNOWLEDGMENT = "Viewing contact";
public static final String CLOSE_VIEW_ACKNOWLEDGMENT = "Closing view of contact";
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/seedu/address/ui/HelpWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import seedu.address.logic.commands.FilterCommand;
import seedu.address.logic.commands.FindCommand;
import seedu.address.logic.commands.GitHubCommand;
import seedu.address.logic.commands.HelpCommand;
import seedu.address.logic.commands.ImportCommand;
import seedu.address.logic.commands.ListCommand;
import seedu.address.logic.commands.MarkCommand;
Expand Down Expand Up @@ -63,6 +64,7 @@ public class HelpWindow extends UiPart<Stage> {
new CommandDetailCard(SortCommand.COMMAND_WORD, SortCommand.MESSAGE_USAGE),
new CommandDetailCard(ViewCommand.COMMAND_WORD, ViewCommand.MESSAGE_USAGE),
new CommandDetailCard(ExitCommand.COMMAND_WORD, ExitCommand.MESSAGE_USAGE),
new CommandDetailCard(HelpCommand.COMMAND_WORD, HelpCommand.MESSAGE_USAGE),
};

private final ObservableList<CommandDetailCard> commandList = FXCollections.observableArrayList();
Expand Down

0 comments on commit 98b91f9

Please sign in to comment.