From 7b4a3fc298cd64bf6bc68720ca3f74d7e621d508 Mon Sep 17 00:00:00 2001 From: TanZhanMing Date: Fri, 1 Nov 2019 14:52:04 +0800 Subject: [PATCH 1/2] Fix helpWindow bug --- src/main/java/seedu/address/ui/HelpWindow.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/seedu/address/ui/HelpWindow.java b/src/main/java/seedu/address/ui/HelpWindow.java index 8c4e48954d4..7cbc4b31415 100644 --- a/src/main/java/seedu/address/ui/HelpWindow.java +++ b/src/main/java/seedu/address/ui/HelpWindow.java @@ -18,7 +18,8 @@ public class HelpWindow extends UiPart { public static final String USERGUIDE_URL = "https://ay1920s1-cs2103t-w12-1.github.io/main/UserGuide.html"; - public static final String HELP_MESSAGE = "The 'help' command format is as follows: " + public static TreeSet defaultCommandList = new TreeSet<>(FinSecParser.getCommandList().values()); + public static String helpMsg = "The 'help' command format is as follows: " + "help cmd/COMMAND type/TYPE" + "\n\n" + "Command List: \n" @@ -39,7 +40,6 @@ public class HelpWindow extends UiPart { private static final Logger logger = LogsCenter.getLogger(HelpWindow.class); private static final String FXML = "HelpWindow.fxml"; - private static TreeSet defaultCommandList = new TreeSet<>(FinSecParser.getCommandList().values()); @FXML private Button gotoButton; @@ -54,7 +54,7 @@ public class HelpWindow extends UiPart { */ public HelpWindow(Stage root) { super(FXML, root); - helpMessage.setText(HELP_MESSAGE); + helpMessage.setText(helpMsg); } /** From c82e223ddbcd1ca286b9b1e6350916cdba911ed9 Mon Sep 17 00:00:00 2001 From: TanZhanMing Date: Fri, 1 Nov 2019 14:57:54 +0800 Subject: [PATCH 2/2] Fix helpWindow bug --- src/main/java/seedu/address/ui/HelpWindow.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/seedu/address/ui/HelpWindow.java b/src/main/java/seedu/address/ui/HelpWindow.java index 7cbc4b31415..678ba5dd242 100644 --- a/src/main/java/seedu/address/ui/HelpWindow.java +++ b/src/main/java/seedu/address/ui/HelpWindow.java @@ -18,8 +18,12 @@ public class HelpWindow extends UiPart { public static final String USERGUIDE_URL = "https://ay1920s1-cs2103t-w12-1.github.io/main/UserGuide.html"; - public static TreeSet defaultCommandList = new TreeSet<>(FinSecParser.getCommandList().values()); - public static String helpMsg = "The 'help' command format is as follows: " + + private static final Logger logger = LogsCenter.getLogger(HelpWindow.class); + private static final String FXML = "HelpWindow.fxml"; + + private static TreeSet defaultCommandList = new TreeSet<>(FinSecParser.getCommandList().values()); + private static String helpMsg = "The 'help' command format is as follows: " + "help cmd/COMMAND type/TYPE" + "\n\n" + "Command List: \n" @@ -38,9 +42,6 @@ public class HelpWindow extends UiPart { + "Example: help cmd/add_contact type/guide\n" + "For more information you can refer to the user guide by clicking on the button"; - private static final Logger logger = LogsCenter.getLogger(HelpWindow.class); - private static final String FXML = "HelpWindow.fxml"; - @FXML private Button gotoButton; @@ -113,6 +114,10 @@ public static TreeSet getDefaultCommandList() { return defaultCommandList; } + public static String getHelpMsg() { + return helpMsg; + } + /** * Copies the URL to the user guide to the clipboard. */