Skip to content

Commit

Permalink
Update messages of all commands
Browse files Browse the repository at this point in the history
  • Loading branch information
rachx committed Oct 29, 2016
1 parent 332d47c commit 635675d
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 66 deletions.
11 changes: 6 additions & 5 deletions src/main/java/seedu/agendum/commons/core/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
*/
public class Messages {

public static final String MESSAGE_UNKNOWN_COMMAND = "Unknown command";
public static final String MESSAGE_UNKNOWN_COMMAND_WITH_SUGGESTION = "Unknown command, did you mean '%1$s'?";
public static final String MESSAGE_INVALID_COMMAND_FORMAT = "Invalid command format! \n%1$s";
public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX = "The task index provided is invalid";
public static final String MESSAGE_TASKS_LISTED_OVERVIEW = "%1$d tasks listed!";
public static final String MESSAGE_UNKNOWN_COMMAND = "We don't recognise this command";
public static final String MESSAGE_UNKNOWN_COMMAND_WITH_SUGGESTION = "Did you mean '%1$s'?";
public static final String MESSAGE_INVALID_COMMAND_FORMAT =
"We don't understand your command format. Try\n%1$s";
public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX = "Hey, the task index given is invalid";
public static final String MESSAGE_TASKS_LISTED_OVERVIEW = "%1$d tasks listed/found!";

}
16 changes: 9 additions & 7 deletions src/main/java/seedu/agendum/logic/commands/AddCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ public class AddCommand extends Command {

public static final String COMMAND_WORD = "add";

public static final String COMMAND_FORMAT = "add <name> \nadd <name> by <deadline> \nadd <name> from <start-time> \nto <end-time>";
public static final String COMMAND_FORMAT = "add <name>\n"
+ "add <name> by <deadline> \n"
+ "add <name> from <start-time> to <end-time>";
public static final String COMMAND_DESCRIPTION = "adds a task to Agendum";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a task with no time and date. \n"
+ "Parameters: NAME\n"
+ "Example: " + COMMAND_WORD
+ " Watch Star Wars t/movies";
public static final String MESSAGE_USAGE = COMMAND_WORD + " - "
+ COMMAND_DESCRIPTION + "\n"
+ COMMAND_FORMAT + "\n"
+ "Example: " + COMMAND_WORD + " Watch Star Wars from 7pm to 9pm";

public static final String MESSAGE_SUCCESS = "New task added: %1$s";
public static final String MESSAGE_DUPLICATE_TASK = "This task already exists";
public static final String MESSAGE_SUCCESS = "Task added: %1$s";
public static final String MESSAGE_DUPLICATE_TASK = "This task already exists!";

private Task toAdd = null;

Expand Down
12 changes: 7 additions & 5 deletions src/main/java/seedu/agendum/logic/commands/DeleteCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ public class DeleteCommand extends Command {

// COMMAND_WORD, COMMAND_FORMAT, COMMAND_DESCRIPTION are for display in help window
public static final String COMMAND_WORD = "delete";
public static final String COMMAND_FORMAT = "delete <index> \ndelete <index> <more-indexes>";
public static final String COMMAND_FORMAT = "delete <index>\n"
+ "delete <index> <more-indexes>";
public static final String COMMAND_DESCRIPTION = "delete task(s) from Agendum";
public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Deletes the tasks(s) identified by their index numbers used in the last task listing.\n"
+ "Parameters: INDEX... (must be a positive number)\n"
+ "Example: " + COMMAND_WORD + " 1 2 5-6";
public static final String MESSAGE_USAGE = COMMAND_WORD + " - "
+ COMMAND_DESCRIPTION + "\n"
+ COMMAND_FORMAT + "\n"
+ "(The index must be a positive number)\n"
+ "Example: " + COMMAND_WORD + " 7 10-11";

public static final String MESSAGE_DELETE_TASK_SUCCESS = "Deleted Task(s): %1$s";

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

// COMMAND_WORD, COMMAND_FORMAT, COMMAND_DESCRIPTION are for display in help window
public static final String COMMAND_WORD = "find";
public static final String COMMAND_FORMAT= "find <keyword> \nfind <keywords>";
public static final String COMMAND_DESCRIPTION = "search for task(s) based on keywords";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all tasks whose names contain any of "
+ "the specified keywords (case-sensitive) and displays them as a list with index numbers.\n"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
public static final String COMMAND_FORMAT= "find <keyword> <more-keywords>";
public static final String COMMAND_DESCRIPTION = "search for task(s) matching any of the keywords";
public static final String MESSAGE_USAGE = COMMAND_WORD + " - "
+ COMMAND_DESCRIPTION + "\n"
+ COMMAND_FORMAT + "\n"
+ "Example: " + COMMAND_WORD + " star wars";

private Set<String> keywords = null;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/seedu/agendum/logic/commands/HelpCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public class HelpCommand extends Command {
// COMMAND_WORD, COMMAND_FORMAT, COMMAND_DESCRIPTION are for display in help window
public static final String COMMAND_WORD = "help";
public static final String COMMAND_FORMAT = "help";
public static final String COMMAND_DESCRIPTION = "view Agendum’s command summary";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Shows program usage instructions.\n"
+ "Example: " + COMMAND_WORD;
public static final String COMMAND_DESCRIPTION = "view a summary of Agendum commands";
public static final String MESSAGE_USAGE = COMMAND_WORD + "- "
+ COMMAND_DESCRIPTION;

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

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

public static final String COMMAND_WORD = "load";
public static final String COMMAND_FORMAT = "load <location>";
public static final String COMMAND_DESCRIPTION = "loads task list from specified location";
public static final String COMMAND_DESCRIPTION = "loads task data from the specified location";

public static final String MESSAGE_SUCCESS = "Data successfully loaded from: %1$s";
public static final String MESSAGE_PATH_INVALID = "The specified path to file is invalid: %1$s";
public static final String MESSAGE_FILE_DOES_NOT_EXIST = "The specified file does not exist: %1$s";
public static final String MESSAGE_FILE_WRONG_FORMAT = "The specified file is in the wrong format: %1$s";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Specify a file to load from. \n"
+ "Parameters: PATH_TO_FILE\n"
+ "Example: " + COMMAND_WORD
+ "agendum/todolist.xml";
public static final String MESSAGE_USAGE = COMMAND_WORD + " - "
+ COMMAND_DESCRIPTION + "\n"
+ COMMAND_FORMAT + "\n"
+ "Example: " + COMMAND_WORD + "agendum/todolist.xml";

private String pathToFile;

Expand Down
16 changes: 9 additions & 7 deletions src/main/java/seedu/agendum/logic/commands/MarkCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
public class MarkCommand extends Command {

// COMMAND_WORD, COMMAND_FORMAT, COMMAND_DESCRIPTION are for display in help window
public static final String COMMAND_WORD = "mark";
public static final String COMMAND_FORMAT = "mark <index> \nmark <indexes>";
public static final String COMMAND_DESCRIPTION ="mark task(s) as completed";
public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Marks the tasks(s) identified by their index numbers used in the last task listing.\n"
+ "Parameters: INDEX... (must be a positive number)\n"
+ "Example: " + COMMAND_WORD + " 1 2 5-6";
public static final String COMMAND_WORD = "mark";
public static final String COMMAND_FORMAT = "mark <index>\n"
+ "mark <index> <more-indexes>";
public static final String COMMAND_DESCRIPTION = "mark task(s) as completed";
public static final String MESSAGE_USAGE = COMMAND_WORD + " - "
+ COMMAND_DESCRIPTION + "\n"
+ COMMAND_FORMAT + "\n"
+ "(The index must be a positive number)\n"
+ "Example: " + COMMAND_WORD + " 1 3 5-6";

public static final String MESSAGE_MARK_TASK_SUCCESS = "Marked Task(s): %1$s";

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/seedu/agendum/logic/commands/RenameCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public class RenameCommand extends Command {
public static final String COMMAND_WORD = "rename";
public static final String COMMAND_FORMAT = "rename <index> <new-name>";
public static final String COMMAND_DESCRIPTION = "update the name of a task";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Rename an existing task. "
+ "Parameters: INDEX (must be a positive number) NAME\n"
+ "Example: " + COMMAND_WORD
+ " 2 Watch Star Wars";
public static final String MESSAGE_USAGE = COMMAND_WORD + " - "
+ COMMAND_DESCRIPTION + "\n"
+ COMMAND_FORMAT + "\n"
+ "Example: " + COMMAND_WORD + " 2 Watch Star Trek";

public static final String MESSAGE_SUCCESS = "Task #%1$s renamed: %2$s";
public static final String MESSAGE_DUPLICATE_TASK = "This task already exists";
public static final String MESSAGE_DUPLICATE_TASK = "This task already exists!";

public int targetIndex = -1;;
public Name newTaskName = null;
Expand Down
17 changes: 9 additions & 8 deletions src/main/java/seedu/agendum/logic/commands/ScheduleCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@
public class ScheduleCommand extends Command {

public static final String COMMAND_WORD = "schedule";
public static final String COMMAND_FORMAT = "schedule <name> "
+ "\nschedule <name> by <deadline> "
+ "\nschedule <name> from <start-time>\nto <end-time>";
public static final String COMMAND_FORMAT = "schedule <index>\n"
+ "schedule <index> by <deadline>\n"
+ "schedule <index> from <start-time> to <end-time>";
public static final String COMMAND_DESCRIPTION = "update the time of a task";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Re-schedule an existing task. "
+ "Parameters: INDEX (must be a positive number) [NEW DEADLINE/ START_TIME/ END_TIME]\n"
+ "Example: " + COMMAND_WORD
+ " 2 from 7pm to 9pm";
public static final String MESSAGE_USAGE = COMMAND_WORD + " - "
+ COMMAND_DESCRIPTION + "\n"
+ COMMAND_FORMAT + "\n"
+ "(The index must be a positive number)\n"
+ "Example: " + COMMAND_WORD + " 2 from 7am to 9am";

public static final String MESSAGE_SUCCESS = "Rescheduled Task #%1$s: %2$s";
public static final String MESSAGE_DUPLICATE_TASK = "This task already exists";
public static final String MESSAGE_DUPLICATE_TASK = "This task already exists!";

public int targetIndex = -1;
private Optional<LocalDateTime> newStartDateTime = Optional.empty();
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/seedu/agendum/logic/commands/StoreCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
public class StoreCommand extends Command {

public static final String COMMAND_WORD = "store";
public static final String COMMAND_FORMAT = "store <path-to-file>";
public static final String COMMAND_DESCRIPTION = "stores task list at specified location";
public static final String COMMAND_FORMAT = "store <location>";
public static final String COMMAND_DESCRIPTION = "stores task data at specified location";
public static final String COMMAND_EXAMPLE = "store agendum/todolist.xml";

public static final String MESSAGE_SUCCESS = "New save location: %1$s";
Expand All @@ -20,10 +20,10 @@ public class StoreCommand extends Command {
public static final String MESSAGE_FILE_EXISTS = "The specified file exists; would you like to use LOAD instead?";
public static final String MESSAGE_PATH_WRONG_FORMAT = "The specified path is in the wrong format. Example: " + COMMAND_EXAMPLE;

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Specify a save location. \n"
+ "Parameters: PATH_TO_FILE\n"
+ "Example: "
+ COMMAND_EXAMPLE;
public static final String MESSAGE_USAGE = COMMAND_WORD + " - "
+ COMMAND_DESCRIPTION + "\n"
+ COMMAND_FORMAT + "\n"
+ "Example: " + COMMAND_WORD + "agendum/todolist.xml";

private String pathToFile;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class UndoCommand extends Command {

public static final String COMMAND_WORD = "undo";
public static final String COMMAND_FORMAT = "undo";
public static final String COMMAND_DESCRIPTION = "Undo last command!";
public static final String COMMAND_DESCRIPTION = "undo the last change to your to-do list";

public static final String MESSAGE_SUCCESS = "Previous command undone!";
public static final String MESSAGE_FAILURE = "Nothing to undo!";
Expand Down
20 changes: 11 additions & 9 deletions src/main/java/seedu/agendum/logic/commands/UnmarkCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@
public class UnmarkCommand extends Command {

// COMMAND_WORD, COMMAND_FORMAT, COMMAND_DESCRIPTION are for display in help window
public static final String COMMAND_WORD = "unmark";
public static final String COMMAND_FORMAT = "unmark <index> \nunmark <indexes>";
public static final String COMMAND_DESCRIPTION = "mark task(s) as uncomplete";
public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Ununmarks the tasks(s) identified by their index numbers used in the last task listing.\n"
+ "Parameters: INDEX... (must be a positive number)\n"
+ "Example: " + COMMAND_WORD + " 1 2 5-6";

public static final String MESSAGE_UNMARK_TASK_SUCCESS = "Ununmarked Task(s): %1$s";
public static final String COMMAND_WORD = "unmark";
public static final String COMMAND_FORMAT = "unmark <index>\n"
+ "unmark <index> <more-indexes>";
public static final String COMMAND_DESCRIPTION = "unmark task(s) from completed";
public static final String MESSAGE_USAGE = COMMAND_WORD + " - "
+ COMMAND_DESCRIPTION + "\n"
+ COMMAND_FORMAT + "\n"
+ "(The index must be a positive number)\n"
+ "Example: " + COMMAND_WORD + " 11-13 15";

public static final String MESSAGE_UNMARK_TASK_SUCCESS = "Unmarked Task(s): %1$s";

public ArrayList<Integer> targetIndexes;

Expand Down

0 comments on commit 635675d

Please sign in to comment.