Skip to content

Commit

Permalink
Merge pull request #288 from AY2223S1-CS2103T-W16-4/chore-fix-invalid…
Browse files Browse the repository at this point in the history
…-command-format

Fix and make command format more consistent
  • Loading branch information
sikai00 authored Nov 1, 2022
2 parents 5312c0b + e877d09 commit e25e21b
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class AddClientCommand extends Command {

public static final String COMMAND_WORD = "addClient";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a client to MyInsuRec. "
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a client.\n"
+ "Parameters: "
+ PREFIX_NAME + "NAME "
+ PREFIX_PHONE + "PHONE "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public class AddMeetingCommand extends Command {

public static final String COMMAND_WORD = "addMeeting";
public static final String MESSAGE_SUCCESS = "New meeting added: %1$s";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a meeting to MyInsuRec.\n"
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a meeting to a client identified "
+ "by their index number.\n"
+ "Parameters: "
+ PREFIX_INDEX + "INDEX "
+ PREFIX_DATE + "DATE "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public class AddProductCommand extends Command {

public static final String COMMAND_WORD = "addProduct";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a product to MyInsuRec. "
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a product.\n"
+ "Parameters: "
+ PREFIX_PRODUCT + "PRODUCT NAME \n"
+ PREFIX_PRODUCT + "PRODUCT NAME\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_PRODUCT + "PrudenSure";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class DeleteClientCommand extends Command {
public static final String COMMAND_WORD = "delClient";

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Deletes the client identified by the index number used in the displayed client list.\n"
+ "Parameters: INDEX (must be a positive integer)\n"
+ ": Deletes the client identified by their index number.\n"
+ "Parameters: " + PREFIX_INDEX + "INDEX\n"
+ "Example: " + COMMAND_WORD + " " + PREFIX_INDEX + "1";

public static final String MESSAGE_DELETE_CLIENT_SUCCESS = "Deleted Client: %1$s";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package seedu.address.logic.commands;

import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_INDEX;

import java.util.List;

Expand All @@ -17,10 +18,9 @@
public class DeleteMeetingCommand extends Command {
public static final String COMMAND_WORD = "delMeeting";

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Deletes the meeting of the client "
+ "by the index number of the client. \n"
+ "Parameters: INDEX (must be a positive integer) \n"
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Deletes the meeting of the client "
+ "identified by their index number.\n"
+ "Parameters: " + PREFIX_INDEX + "INDEX\n"
+ "Example: " + COMMAND_WORD + " i/1";

public static final String MESSAGE_DELETE_MEETING_SUCCESS = "Remove meeting from Client: %1$s";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public class DeleteProductCommand extends Command {
public static final String COMMAND_WORD = "delProduct";

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Deletes the product identified by the index number used in the displayed product list.\n"
+ "Parameters: INDEX (must be a positive integer)\n"
+ ": Deletes the product identified by its index number.\n"
+ "Parameters: " + PREFIX_INDEX + "INDEX\n"
+ "Example: " + COMMAND_WORD + " " + PREFIX_INDEX + "1";

public static final String MESSAGE_DELETE_PRODUCT_SUCCESS = "Deleted Product: %1$s";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public class EditClientCommand extends Command {
public static final String COMMAND_WORD = "editClient";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the details of the client identified "
+ "by the index number used in the displayed client list. "
+ "by their index number. "
+ "Existing values will be overwritten by the input values.\n"
+ "Parameters: INDEX (must be a positive integer) "
+ "Parameters: " + PREFIX_INDEX + "INDEX "
+ "[" + PREFIX_NAME + "NAME] "
+ "[" + PREFIX_PHONE + "PHONE] "
+ "[" + PREFIX_EMAIL + "EMAIL] "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public class EditMeetingCommand extends Command {
public static final String COMMAND_WORD = "editMeeting";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the details of the meeting identified "
+ "by the index number used in the displayed meeting list. \n"
+ "by their index number. \n"
+ "Existing values will be overwritten by the input values.\n"
+ "Parameters: INDEX (must be a positive integer) \n"
+ "Parameters: " + PREFIX_INDEX + "INDEX "
+ "[" + PREFIX_DATE + "DATE] "
+ "[" + PREFIX_START_TIME + "START TIME] "
+ "[" + PREFIX_END_TIME + "END TIME] "
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package seedu.address.logic.commands;

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_INDEX;

import java.util.List;

Expand All @@ -17,8 +18,8 @@ public class ViewClientCommand extends Command {
public static final String COMMAND_WORD = "viewClient";

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Views the client identified by the index number used in the displayed client list.\n"
+ "Parameters: INDEX (must be a positive integer)\n"
+ ": Views the client identified by their index number.\n"
+ "Parameters: " + PREFIX_INDEX + "INDEX\n"
+ "Example: " + COMMAND_WORD + " i/1";

public static final String MESSAGE_SUCCESS = "Viewed client: %1$s";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class ViewMeetingCommand extends Command {
public static final String COMMAND_WORD = "viewMeeting";

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Views the meeting identified by the index number used in the displayed meeting list.\n"
+ "Parameters: INDEX (must be a positive integer)\n"
+ ": Views the meeting identified by their index number.\n"
+ "Parameters: " + PREFIX_INDEX + "INDEX\n"
+ "Example: " + COMMAND_WORD + " " + PREFIX_INDEX + "1";

public static final String MESSAGE_SUCCESS = "Viewed meeting: %1$s";
Expand Down

0 comments on commit e25e21b

Please sign in to comment.