From c38d7bf553c45e46856c672db9f5493eeeabfad6 Mon Sep 17 00:00:00 2001 From: Zack-Tay <101039486+Zack-Tay@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:00:21 +0800 Subject: [PATCH] Update naming convention for commands (#106) * Update naming convention for application * Update gradle file to support javafx swing library * Update statusbar for application --- build.gradle | 2 +- .../java/seedu/address/logic/commands/DeleteCommand.java | 2 +- src/main/java/seedu/address/logic/commands/EditCommand.java | 2 +- src/main/java/seedu/address/logic/commands/ExitCommand.java | 2 +- src/main/java/seedu/address/logic/commands/HelpCommand.java | 2 +- .../seedu/address/logic/commands/ListClassesCommand.java | 2 +- .../seedu/address/logic/commands/ListStudentsCommand.java | 3 +-- .../seedu/address/logic/parser/AddClassCommandParser.java | 6 +++--- .../address/logic/parser/DeleteClassCommandParser.java | 6 +++--- .../address/logic/parser/DeleteStudentCommandParser.java | 6 +++--- src/main/java/seedu/address/logic/parser/Prefix.java | 2 +- src/main/java/seedu/address/model/UserPrefs.java | 2 +- src/main/java/seedu/address/model/person/Email.java | 2 +- src/main/java/seedu/address/model/person/Name.java | 4 ++-- src/main/java/seedu/address/model/tag/Tag.java | 2 +- 15 files changed, 22 insertions(+), 23 deletions(-) diff --git a/build.gradle b/build.gradle index 528e722d8a4..8dba104ccbd 100644 --- a/build.gradle +++ b/build.gradle @@ -74,7 +74,7 @@ dependencies { } shadowJar { - archiveFileName = 'addressbook.jar' + archiveFileName = 'tahelper.jar' } defaultTasks 'clean', 'test' diff --git a/src/main/java/seedu/address/logic/commands/DeleteCommand.java b/src/main/java/seedu/address/logic/commands/DeleteCommand.java index 1135ac19b74..11ae43bd1c9 100644 --- a/src/main/java/seedu/address/logic/commands/DeleteCommand.java +++ b/src/main/java/seedu/address/logic/commands/DeleteCommand.java @@ -12,7 +12,7 @@ import seedu.address.model.person.Person; /** - * Deletes a person identified using it's displayed index from the address book. + * Deletes a person identified using it's displayed index from tahelper system. */ public class DeleteCommand extends Command { diff --git a/src/main/java/seedu/address/logic/commands/EditCommand.java b/src/main/java/seedu/address/logic/commands/EditCommand.java index 73823fc61f6..90f559fb985 100644 --- a/src/main/java/seedu/address/logic/commands/EditCommand.java +++ b/src/main/java/seedu/address/logic/commands/EditCommand.java @@ -27,7 +27,7 @@ import seedu.address.model.tag.Tag; /** - * Edits the details of an existing person in the address book. + * Edits the details of an existing person in tahelper's system */ public class EditCommand extends Command { diff --git a/src/main/java/seedu/address/logic/commands/ExitCommand.java b/src/main/java/seedu/address/logic/commands/ExitCommand.java index 3dd85a8ba90..70703fd7595 100644 --- a/src/main/java/seedu/address/logic/commands/ExitCommand.java +++ b/src/main/java/seedu/address/logic/commands/ExitCommand.java @@ -7,7 +7,7 @@ */ public class ExitCommand extends Command { - public static final String COMMAND_WORD = "exit"; + public static final String COMMAND_WORD = "/exit"; public static final String MESSAGE_EXIT_ACKNOWLEDGEMENT = "Exiting Address Book as requested ..."; diff --git a/src/main/java/seedu/address/logic/commands/HelpCommand.java b/src/main/java/seedu/address/logic/commands/HelpCommand.java index bf824f91bd0..1735597b18f 100644 --- a/src/main/java/seedu/address/logic/commands/HelpCommand.java +++ b/src/main/java/seedu/address/logic/commands/HelpCommand.java @@ -7,7 +7,7 @@ */ public class HelpCommand extends Command { - public static final String COMMAND_WORD = "help"; + public static final String COMMAND_WORD = "/help"; public static final String MESSAGE_USAGE = COMMAND_WORD + ": Shows program usage instructions.\n" + "Example: " + COMMAND_WORD; diff --git a/src/main/java/seedu/address/logic/commands/ListClassesCommand.java b/src/main/java/seedu/address/logic/commands/ListClassesCommand.java index 61b83ef4ce1..dfae02b1de9 100644 --- a/src/main/java/seedu/address/logic/commands/ListClassesCommand.java +++ b/src/main/java/seedu/address/logic/commands/ListClassesCommand.java @@ -5,7 +5,7 @@ import seedu.address.model.Model; /** - * Lists all modules and their associated tutorial classes in the address book to the user. + * Lists all modules and their associated tutorial classes in TAHelper to the user. */ public class ListClassesCommand extends Command { diff --git a/src/main/java/seedu/address/logic/commands/ListStudentsCommand.java b/src/main/java/seedu/address/logic/commands/ListStudentsCommand.java index 8caea60fc78..ffb95901ff5 100644 --- a/src/main/java/seedu/address/logic/commands/ListStudentsCommand.java +++ b/src/main/java/seedu/address/logic/commands/ListStudentsCommand.java @@ -6,12 +6,11 @@ import seedu.address.model.Model; /** - * Lists all persons in the address book to the user. + * Lists all persons in TAHelper to the user. */ public class ListStudentsCommand extends Command { public static final String COMMAND_WORD = "/list_students"; - public static final String MESSAGE_SUCCESS = "Listed all students"; diff --git a/src/main/java/seedu/address/logic/parser/AddClassCommandParser.java b/src/main/java/seedu/address/logic/parser/AddClassCommandParser.java index 3ff3b8ca12c..d72efc8aa4a 100644 --- a/src/main/java/seedu/address/logic/parser/AddClassCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/AddClassCommandParser.java @@ -15,12 +15,12 @@ /** - * Parses input arguments and creates a new {@code RemarkCommand} object + * Parses input arguments and creates a new {@code AddClassCommandParser} object */ public class AddClassCommandParser implements Parser { /** - * Parses the given {@code String} of arguments in the context of the {@code RemarkCommand} - * and returns a {@code RemarkCommand} object for execution. + * Parses the given {@code String} of arguments in the context of the {@code AddClassCommandParser} + * and returns a {@code AddClassCommandParser} object for execution. * @throws ParseException if the user input does not conform the expected format */ public AddClassCommand parse(String args) throws ParseException { diff --git a/src/main/java/seedu/address/logic/parser/DeleteClassCommandParser.java b/src/main/java/seedu/address/logic/parser/DeleteClassCommandParser.java index fe761612a3f..b50d8e99918 100644 --- a/src/main/java/seedu/address/logic/parser/DeleteClassCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/DeleteClassCommandParser.java @@ -15,12 +15,12 @@ /** - * Parses input arguments and creates a new {@code RemarkCommand} object + * Parses input arguments and creates a new {@code DeleteClassCommandParser} object */ public class DeleteClassCommandParser implements Parser { /** - * Parses the given {@code String} of arguments in the context of the {@code RemarkCommand} - * and returns a {@code RemarkCommand} object for execution. + * Parses the given {@code String} of arguments in the context of the {@code DeleteClassCommandParser} + * and returns a {@code DeleteClassCommandParser} object for execution. * @throws ParseException if the user input does not conform the expected format */ public DeleteClassCommand parse(String args) throws ParseException { diff --git a/src/main/java/seedu/address/logic/parser/DeleteStudentCommandParser.java b/src/main/java/seedu/address/logic/parser/DeleteStudentCommandParser.java index a547a788669..e5e278ef2e1 100644 --- a/src/main/java/seedu/address/logic/parser/DeleteStudentCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/DeleteStudentCommandParser.java @@ -16,14 +16,14 @@ import seedu.address.model.person.StudentId; /** - * Parses input arguments and creates a new DeleteCommand object + * Parses input arguments and creates a new DeleteStudentCommand object */ public class DeleteStudentCommandParser implements Parser { /** * Parses the given {@code String} of arguments in the context of the - * DeleteCommand - * and returns a DeleteCommand object for execution. + * DeleteStudentCommand + * and returns a DeleteStudentCommand object for execution. * * @throws ParseException if the user input does not conform the expected format */ diff --git a/src/main/java/seedu/address/logic/parser/Prefix.java b/src/main/java/seedu/address/logic/parser/Prefix.java index 348b7686c8a..f443e9a28d2 100644 --- a/src/main/java/seedu/address/logic/parser/Prefix.java +++ b/src/main/java/seedu/address/logic/parser/Prefix.java @@ -2,7 +2,7 @@ /** * A prefix that marks the beginning of an argument in an arguments string. - * E.g. 't/' in 'add James t/ friend'. + * E.g. 'tag/' in '/add_students name/john ...... tag/ friend'. */ public class Prefix { private final String prefix; diff --git a/src/main/java/seedu/address/model/UserPrefs.java b/src/main/java/seedu/address/model/UserPrefs.java index 6be655fb4c7..6195bf13ca5 100644 --- a/src/main/java/seedu/address/model/UserPrefs.java +++ b/src/main/java/seedu/address/model/UserPrefs.java @@ -14,7 +14,7 @@ public class UserPrefs implements ReadOnlyUserPrefs { private GuiSettings guiSettings = new GuiSettings(); - private Path addressBookFilePath = Paths.get("data" , "addressbook.json"); + private Path addressBookFilePath = Paths.get("data" , "tahelper.json"); /** * Creates a {@code UserPrefs} with default values. diff --git a/src/main/java/seedu/address/model/person/Email.java b/src/main/java/seedu/address/model/person/Email.java index 24b6faf4001..be632593a54 100644 --- a/src/main/java/seedu/address/model/person/Email.java +++ b/src/main/java/seedu/address/model/person/Email.java @@ -4,7 +4,7 @@ import static seedu.address.commons.util.AppUtil.checkArgument; /** - * Represents a Person's email in the address book. + * Represents a Person's email in TAHelper. * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)} */ public class Email { diff --git a/src/main/java/seedu/address/model/person/Name.java b/src/main/java/seedu/address/model/person/Name.java index 173f15b9b00..b217db4b5ff 100644 --- a/src/main/java/seedu/address/model/person/Name.java +++ b/src/main/java/seedu/address/model/person/Name.java @@ -4,7 +4,7 @@ import static seedu.address.commons.util.AppUtil.checkArgument; /** - * Represents a Person's name in the address book. + * Represents a Person's name in TAHelper. * Guarantees: immutable; is valid as declared in {@link #isValidName(String)} */ public class Name { @@ -13,7 +13,7 @@ public class Name { "Names should only contain alphanumeric characters and spaces, and it should not be blank"; /* - * The first character of the address must not be a whitespace, + * The first character of the name must not be a whitespace, * otherwise " " (a blank string) becomes a valid input. */ public static final String VALIDATION_REGEX = "[\\p{Alnum}][\\p{Alnum} ]*"; diff --git a/src/main/java/seedu/address/model/tag/Tag.java b/src/main/java/seedu/address/model/tag/Tag.java index f1a0d4e233b..18ecf218856 100644 --- a/src/main/java/seedu/address/model/tag/Tag.java +++ b/src/main/java/seedu/address/model/tag/Tag.java @@ -4,7 +4,7 @@ import static seedu.address.commons.util.AppUtil.checkArgument; /** - * Represents a Tag in the address book. + * Represents a Tag in TAHelper. * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)} */ public class Tag {