diff --git a/src/main/java/yappingbot/Launcher.java b/src/main/java/yappingbot/Launcher.java index 4ef6d9e139..cd0a5911c3 100644 --- a/src/main/java/yappingbot/Launcher.java +++ b/src/main/java/yappingbot/Launcher.java @@ -11,7 +11,8 @@ */ public class Launcher { - public static String savefilePath; + // default savefile path is './savefile' + private static String savefilePath = "./savefile"; /** * MainGuiApplication entry point. Parses arguments and launches YappingBot appropriately. @@ -25,11 +26,13 @@ public static void main(String[] args) { // NOTE: args DOES NOT INCLUDE FILENAME AT ARGS[0] boolean isUsingGui = true; boolean stopTakingInputs = false; - String customSavefilePath = ""; String[] jfxArgs = new String[0]; + // loops through arguments to parse them. + // any arguments preceeding a '--' are not processed and directly passed on to javaFX for (int i = 0; i < args.length; i++) { if (stopTakingInputs) { + // -- has been detected. Stop and just copy everything to be passed to javaFX jfxArgs = Arrays.copyOfRange(args, i + 1, args.length); break; } else { @@ -39,12 +42,14 @@ public static void main(String[] args) { continue; case "-s": case "--savefile": + // peek the next arguemnt to get the savefile name int savefilePathIndex = i + 1; if (savefilePathIndex >= args.length || args[savefilePathIndex].startsWith("-")) { System.out.printf("Error: %s missing argument: savefile path!\n", args[i]); } else { - customSavefilePath = args[savefilePathIndex]; + savefilePath = args[savefilePathIndex]; + // only advance the pointer if there was a valid value for this flag i = i + 1; } continue; @@ -57,11 +62,10 @@ public static void main(String[] args) { } } - Launcher.savefilePath = customSavefilePath.isEmpty() ? "./savefile" : customSavefilePath; if (isUsingGui) { launchGui(jfxArgs); } else { - launchCli(jfxArgs); + launchCli(); } } @@ -77,10 +81,8 @@ public static void launchGui(String[] args) { /** * Static method to launchGui MainGuiApplication with JavaFX GUI. - * - * @param args String ArrayList of arguments passed in via CLI when launching this app. */ - public static void launchCli(String[] args) { + public static void launchCli() { YappingBot yp = new YappingBot(new UiCli(), new Storage(savefilePath)); yp.start(); } diff --git a/src/main/java/yappingbot/YappingBot.java b/src/main/java/yappingbot/YappingBot.java index aa017ee38b..3dcca1a3fd 100644 --- a/src/main/java/yappingbot/YappingBot.java +++ b/src/main/java/yappingbot/YappingBot.java @@ -5,7 +5,7 @@ import yappingbot.commands.CommandDispatcher; import yappingbot.commands.Parser; import yappingbot.exceptions.YappingBotException; -import yappingbot.exceptions.YappingBotInvalidSaveFileException; +import yappingbot.exceptions.YappingBotExceptionList; import yappingbot.exceptions.YappingBotSaveFileNotFoundException; import yappingbot.exceptions.YappingBotUnknownCommandException; import yappingbot.storage.Storage; @@ -46,15 +46,12 @@ public YappingBot(Ui ui, Storage storage) { * load the list from disk. */ private void init() { + ui.print(ReplyTextMessages.GREETING_TEXT); userList = new TaskList(); try { ArrayList s = storage.loadListFromFile(); - YappingBotInvalidSaveFileException e = userList.generateFromRaw(s); - // Lord forgive me for returning execptions without throwing them is so - // illegal. - if (e != null) { - ui.printError(e); - } + YappingBotExceptionList e = userList.generateFromRaw(s); + e.checkExceptions(); } catch (YappingBotSaveFileNotFoundException e) { ui.printError(e); } @@ -71,6 +68,7 @@ private void saveAndCleanup() { } catch (YappingBotException e) { ui.printError(String.format(ReplyTextMessages.SAVE_FILE_ERROR_1s, e.getMessage())); } + ui.print(ReplyTextMessages.EXIT_TEXT); } /** @@ -80,48 +78,61 @@ private void mainLoop() { while (ui.hasInputLines()) { String userInput = ui.getNextInputLine().trim(); String[] userInputSlices = userInput.split(" "); + int taskListIndexPtr; // task list pointer + try { - int taskListIndexPtr; // task list pointer switch (parser.parseCommand(userInputSlices[0])) { case EXIT: + // exits the function, ending the main loop return; case RESET_LIST: + // resets any filter on the list userList = commandDispatch.resetView(userList, false); break; case LIST: + // lists out all tasks that fits current filter (if any) commandDispatch.printUserList(userList); break; case MARK: + // marks a task as Done, given the index Parser.checkMinimumArgsAvailable(userInputSlices, 1); taskListIndexPtr = Parser.parseTaskNumberSelected(userInputSlices[1]); commandDispatch.changeTaskListStatus(taskListIndexPtr, true, userList); break; case UNMARK: + // unmarks a task as Done, given the index Parser.checkMinimumArgsAvailable(userInputSlices, 1); taskListIndexPtr = Parser.parseTaskNumberSelected(userInputSlices[1]); commandDispatch.changeTaskListStatus(taskListIndexPtr, false, userList); break; case DELETE: + // deletes a task from list, given the index Parser.checkMinimumArgsAvailable(userInputSlices, 1); taskListIndexPtr = Parser.parseTaskNumberSelected(userInputSlices[1]); commandDispatch.deleteTask(taskListIndexPtr, userList); break; case TODO: + // creates a new to-do task commandDispatch.createNewTask(userInputSlices, TaskTypes.TODO, userList); break; case EVENT: + // creates a new event task commandDispatch.createNewTask(userInputSlices, TaskTypes.EVENT, userList); break; case DEADLINE: + // creates a new deadline task commandDispatch.createNewTask(userInputSlices, TaskTypes.DEADLINE, userList); break; case FIND: + // creates a filtered list view with tasks matching the given criteria Parser.checkMinimumArgsAvailable(userInputSlices, 1); String searchString = userInput.substring(userInput.indexOf(" ") + 1); userList = commandDispatch.findStringInTasks(searchString, userList); break; case UNKNOWN: default: + // catch-all for malformed commands marked UNKNOWN, or any uncaught and + // unimplemented comannd throw new YappingBotUnknownCommandException(); } } catch (YappingBotException e) { @@ -137,9 +148,7 @@ private void mainLoop() { */ public void start() { init(); - ui.print(ReplyTextMessages.GREETING_TEXT); mainLoop(); saveAndCleanup(); - ui.print(ReplyTextMessages.EXIT_TEXT); } } diff --git a/src/main/java/yappingbot/commands/Parser.java b/src/main/java/yappingbot/commands/Parser.java index 5749718ea2..212a968f66 100644 --- a/src/main/java/yappingbot/commands/Parser.java +++ b/src/main/java/yappingbot/commands/Parser.java @@ -64,7 +64,7 @@ public CommandTypes parseCommand(String commandString) /** * Parses any text that must be interpreted as an integer. * - * @param userInputSlice String of text to be converted to integer. + * @param userInputSlices String of text to be converted to integer. * @return integer of the parsed integer. * @throws YappingBotInvalidTaskNumberException Exception if given String is not a valid * integer. diff --git a/src/main/java/yappingbot/exceptions/YappingBotExceptionList.java b/src/main/java/yappingbot/exceptions/YappingBotExceptionList.java new file mode 100644 index 0000000000..7c5e71d2e4 --- /dev/null +++ b/src/main/java/yappingbot/exceptions/YappingBotExceptionList.java @@ -0,0 +1,33 @@ +package yappingbot.exceptions; + +import java.util.ArrayList; + +import yappingbot.stringconstants.ReplyTextMessages; + +/** + * Array container for multiple YappingBotExceptions that are to be collected and thrown together + * at the end. + */ +public class YappingBotExceptionList extends ArrayList { + + /** + * Checks if any exceptions were added, and collates them into a single generic + * YappingBotException. + * + * @throws YappingBotException only if exceptions are present and added. + */ + public void checkExceptions() throws YappingBotException { + if (!isEmpty()) { + StringBuilder sb = new StringBuilder(); + for (YappingBotException e : this) { + sb.append(e.getErrorMessage()); + sb.append("\n---\n"); + } + throw new YappingBotException(String.format( + ReplyTextMessages.MULTIPLE_EXCEPTIONS_1d_1s, + this.size(), + sb + )); + } + } +} diff --git a/src/main/java/yappingbot/exceptions/YappingBotInvalidTaskNumberException.java b/src/main/java/yappingbot/exceptions/YappingBotInvalidTaskNumberException.java index fbf9a7ce9a..d6c13368b2 100644 --- a/src/main/java/yappingbot/exceptions/YappingBotInvalidTaskNumberException.java +++ b/src/main/java/yappingbot/exceptions/YappingBotInvalidTaskNumberException.java @@ -9,11 +9,11 @@ public class YappingBotInvalidTaskNumberException extends YappingBotException { /** * Constructs Exception when a String, expected to be an index, is unable to be parsed. * - * @param userInputSlice The offending text that cannot be resolved into an integer. + * @param userInputSlices The offending text that cannot be resolved into an integer. */ - public YappingBotInvalidTaskNumberException(String userInputSlice) { - super(String.format(ReplyTextMessages.SELECT_TASK_NOT_INT_TEXT_1s, userInputSlice)); + public YappingBotInvalidTaskNumberException(String userInputSlices) { + super(String.format(ReplyTextMessages.SELECT_TASK_NOT_INT_TEXT_1s, userInputSlices)); } } diff --git a/src/main/java/yappingbot/exceptions/YappingBotOobException.java b/src/main/java/yappingbot/exceptions/YappingBotOobException.java index b1c615a184..ecdff9995f 100644 --- a/src/main/java/yappingbot/exceptions/YappingBotOobException.java +++ b/src/main/java/yappingbot/exceptions/YappingBotOobException.java @@ -1,7 +1,5 @@ package yappingbot.exceptions; -import yappingbot.stringconstants.ReplyTextMessages; - /** * YappingBotException for indices that are out of bounds. */ diff --git a/src/main/java/yappingbot/stringconstants/ReplyTextMessages.java b/src/main/java/yappingbot/stringconstants/ReplyTextMessages.java index c51f7c94d8..df38d2750a 100644 --- a/src/main/java/yappingbot/stringconstants/ReplyTextMessages.java +++ b/src/main/java/yappingbot/stringconstants/ReplyTextMessages.java @@ -99,4 +99,5 @@ public final class ReplyTextMessages { public static final String FIND_STRING_FOUND_1d_1s = "Found %d tasks with '%s' (Type reset " + "to return to default view)"; + public static final String MULTIPLE_EXCEPTIONS_1d_1s = "%d warnings were generated!:\n%s"; } diff --git a/src/main/java/yappingbot/tasks/tasklist/TaskList.java b/src/main/java/yappingbot/tasks/tasklist/TaskList.java index 16494d8fd3..049d1d2efb 100644 --- a/src/main/java/yappingbot/tasks/tasklist/TaskList.java +++ b/src/main/java/yappingbot/tasks/tasklist/TaskList.java @@ -8,17 +8,16 @@ import java.util.function.Consumer; import yappingbot.exceptions.YappingBotException; -import yappingbot.exceptions.YappingBotInvalidSaveFileException; +import yappingbot.exceptions.YappingBotExceptionList; import yappingbot.exceptions.YappingBotOobException; import yappingbot.stringconstants.ReplyTextMessages; import yappingbot.tasks.Task; -import yappingbot.ui.Ui; /** * TaskList container to hold valid Tasks. */ public class TaskList implements Iterable { - protected ArrayList tasks; + protected final ArrayList tasks; protected int size; /** @@ -29,33 +28,25 @@ public TaskList() { } /** - * Creates a task list populated with values from the given ArrayList of Strings. + * Creates a task list populated with values from the given ArrayList of Strings. Exceptions + * caught here are returned instead of thrown so that the loop can continue without having + * throws that interrupt the process. * * @param tasksRaw ArrayList of Strings, each a line that denotes a serialized task. + * @return YappingBotException for any caught errors. */ - public YappingBotInvalidSaveFileException generateFromRaw(ArrayList tasksRaw) { + public YappingBotExceptionList generateFromRaw(ArrayList tasksRaw) { assert tasksRaw != null; - - ArrayList errorLists = new ArrayList<>(); + YappingBotExceptionList exceptions = new YappingBotExceptionList(); for (String taskIndividualRaw : tasksRaw) { String[] s = taskIndividualRaw.split(":"); try { this.addTask(parseSingleTask(s)); } catch (YappingBotException e) { - errorLists.add(e); - } - } - - if (!errorLists.isEmpty()) { - StringBuilder sb = new StringBuilder(); - for (Exception e : errorLists) { - // TODO: replace with exception collector class - sb.append(e.toString()); - sb.append('\n'); + exceptions.add(e); } - return new YappingBotInvalidSaveFileException(sb.toString()); } - return null; + return exceptions; } /** diff --git a/src/main/java/yappingbot/tasks/tasklist/TaskListFilterView.java b/src/main/java/yappingbot/tasks/tasklist/TaskListFilterView.java index a043f7e350..0e52f6e53e 100644 --- a/src/main/java/yappingbot/tasks/tasklist/TaskListFilterView.java +++ b/src/main/java/yappingbot/tasks/tasklist/TaskListFilterView.java @@ -13,7 +13,7 @@ public class TaskListFilterView extends TaskList { final TaskList parentTaskList; final ArrayList indexInParentTaskList; - String filterString; + final String filterString; private TaskListFilterView(TaskList parentTaskList, String filterString) { this.parentTaskList = parentTaskList; diff --git a/src/main/java/yappingbot/ui/Ui.java b/src/main/java/yappingbot/ui/Ui.java index 461d972b30..61c1515b17 100644 --- a/src/main/java/yappingbot/ui/Ui.java +++ b/src/main/java/yappingbot/ui/Ui.java @@ -54,6 +54,13 @@ public interface Ui { void printfError(String formattedString, Object ... o); + /** + * Pushes String input into the input buffer to be processed by Yappingbot. + * + * @param input String to be inputted + */ + void pushInputLine(String input); + /** * Peeks into input buffer and returns true if a next line is available, or blocks * until a line is present in the input buffer, or the input stream is closed. @@ -70,14 +77,6 @@ public interface Ui { */ String getNextInputLine(); - - /** - * Returns the output lines in the buffer to be printed. - * - * @return String to be outputted or printed: - */ - String getNextOutputLine() throws YappingBotIoException; - /** * Peeks into output buffer and returns true if a next line is available, or blocks * until a line is present in the output buffer, or the output stream is closed. @@ -85,5 +84,12 @@ public interface Ui { * @return boolean true if line is available, or false if output is closed. */ boolean hasOutputLines(); + + /** + * Returns the output lines in the buffer to be printed. + * + * @return String to be outputted or printed: + */ + String getNextOutputLine() throws YappingBotIoException; } diff --git a/src/main/java/yappingbot/ui/UiCli.java b/src/main/java/yappingbot/ui/UiCli.java index daffefc199..8559922892 100644 --- a/src/main/java/yappingbot/ui/UiCli.java +++ b/src/main/java/yappingbot/ui/UiCli.java @@ -18,6 +18,23 @@ public UiCli() { this.scanner = new Scanner(System.in); } + // OUTPUT methods + + @Override + public void print(String msg) { + System.out.print(quoteMultilineText(msg) + "\n"); + } + + @Override + public void println(String msg) { + System.out.println(quoteSinglelineText(msg)); + } + + @Override + public void printf(String formattedString, Object... o) { + print(String.format(formattedString, o)); + } + @Override public void printError(YappingBotException e) { printError(e.getErrorMessage()); @@ -34,45 +51,45 @@ public void printfError(String formattedString, Object... o) { printError(String.format(formattedString, o)); } - @Override - public boolean hasInputLines() { - return scanner.hasNext(); - } - - @Override - public String getNextInputLine() throws YappingBotIoException { - try { - return scanner.nextLine(); - } catch (Exception e) { - throw new YappingBotIoException(e.getMessage()); - } - } - @Override public String getNextOutputLine() { + // System.out.print directly interfaces with Java's STDOUT. + // We do not need to implement any system to collect and output any STDOUT streams. throw new YappingBotIoException("NOT IMPLEMENTED"); } @Override public boolean hasOutputLines() { + // System.out.print directly interfaces with Java's STDOUT. + // We do not need to implement any system to collect and output any STDOUT streams. throw new YappingBotIoException("NOT IMPLEMENTED"); } + // INPUT methods + @Override - public void print(String msg) { - System.out.print(quoteMultilineText(msg) + "\n"); + public void pushInputLine(String input) { + // Scanner with System.in directly interfaces with Java's STDIN + // We do not need to implement any system to collect inputs and stream to bot. + throw new YappingBotIoException("NOT IMPLEMENTED"); } @Override - public void println(String msg) { - System.out.println(quoteSinglelineText(msg)); + public boolean hasInputLines() { + return scanner.hasNext(); } @Override - public void printf(String formattedString, Object... o) { - print(String.format(formattedString, o)); + public String getNextInputLine() throws YappingBotIoException { + try { + return scanner.nextLine(); + } catch (Exception e) { + throw new YappingBotIoException(e.getMessage()); + } } + // HELPER methods + /** * Decorates the given string, to denote that it is the bot's output. * @@ -104,7 +121,6 @@ private void quoteSinglelineText(String line, StringBuilder sb) { sb.append("\n"); } - /** * Decorates the given string, to denote that it is the bot's output. * This accepts multiple lines. diff --git a/src/main/java/yappingbot/ui/gui/MainGuiApplication.java b/src/main/java/yappingbot/ui/gui/MainGuiApplication.java index 7d969c0eab..eba9a8754d 100644 --- a/src/main/java/yappingbot/ui/gui/MainGuiApplication.java +++ b/src/main/java/yappingbot/ui/gui/MainGuiApplication.java @@ -22,6 +22,8 @@ public class MainGuiApplication extends Application { @Override public void start(Stage stage) { + // Set the close handler to signal ui to turn off streams before closing the system, + // so that the program will not be stuck on a blocking check for new I/O streams. stage.setOnCloseRequest(e -> { ui.setProgramClose(true); Platform.exit(); @@ -32,13 +34,15 @@ public void start(Stage stage) { URL mainWindowResource = MainGuiApplication.class.getResource("/view/MainWindow.fxml"); FXMLLoader fxmlloader = new FXMLLoader(mainWindowResource); + // Vbox holds the main programme: + // + VBox vb = fxmlloader.load(); Scene scene = new Scene(vb); stage.setScene(scene); fxmlloader.getController().setUi(ui); - stage.show(); YappingBot yp = new YappingBot(ui, new Storage(Launcher.getSavefilePath())); diff --git a/src/main/java/yappingbot/ui/gui/MainWindow.java b/src/main/java/yappingbot/ui/gui/MainWindow.java index 3e8dc66fa1..29acd4b6da 100644 --- a/src/main/java/yappingbot/ui/gui/MainWindow.java +++ b/src/main/java/yappingbot/ui/gui/MainWindow.java @@ -4,9 +4,7 @@ import java.io.InputStream; import javafx.application.Platform; -import javafx.concurrent.Worker; import javafx.fxml.FXML; -import javafx.scene.Node; import javafx.scene.control.Button; import javafx.scene.control.ScrollPane; import javafx.scene.control.TextField; @@ -36,6 +34,19 @@ public class MainWindow extends VBox { private volatile UiGui ui; private boolean updateOutput = false; + + /** + * Initialises the MainWindow gui nodes. + */ + @FXML + public void initialize() { + scrollPane.vvalueProperty().bind(dialogContainer.heightProperty()); + + assert userImageStream != null : "userImage is null!"; + assert ypImageStream != null : "userImage is null!"; + userImage = new Image(userImageStream); + ypImage = new Image(ypImageStream); + } /** * Sets the UiGui interface for the window. @@ -44,6 +55,13 @@ public class MainWindow extends VBox { */ public void setUi(UiGui ui) { this.ui = ui; + + // New thread to monitor the OUTPUT stream from the bot, + // and set the update flag. Platform.runLater signals + // JavaFX thread to run the function within its context. + // + // This is here instead of in initialize because we need + // the ui context new Thread(() -> { while (ui.hasOutputLines()) { this.updateOutput = true; @@ -52,26 +70,18 @@ public void setUi(UiGui ui) { }).start(); } - /** - * Initialises the MainWindow gui nodes. - */ - @FXML - public void initialize() { - scrollPane.vvalueProperty().bind(dialogContainer.heightProperty()); - assert userImageStream != null : "userImage is null!"; - assert ypImageStream != null : "userImage is null!"; - userImage = new Image(userImageStream); - ypImage = new Image(ypImageStream); - } /** * Pulls any output present from bot and outputs them. */ private void handleBotOutput() { + // guard clause to prevent unintended loops if (!this.updateOutput) { return; } + + // generate dialog box for robot try { assert ui.hasOutputLines(); String response = ui.getNextOutputLine(); @@ -82,6 +92,8 @@ private void handleBotOutput() { } catch (IOException e) { ui.printError(e.getMessage()); } + + // unset flag so that if JavaFX runs this, the program will not hang. this.updateOutput = false; } diff --git a/src/main/java/yappingbot/ui/gui/UiGui.java b/src/main/java/yappingbot/ui/gui/UiGui.java index 405baa6714..ab4f7e7387 100644 --- a/src/main/java/yappingbot/ui/gui/UiGui.java +++ b/src/main/java/yappingbot/ui/gui/UiGui.java @@ -1,7 +1,6 @@ package yappingbot.ui.gui; import java.util.ArrayDeque; -import java.util.Deque; import yappingbot.exceptions.YappingBotException; import yappingbot.exceptions.YappingBotIoException; @@ -13,9 +12,11 @@ */ public class UiGui implements Ui { - ArrayDeque inputBuffer = new ArrayDeque<>(); - ArrayDeque outputBuffer = new ArrayDeque<>(); - private boolean programClose = false; + final ArrayDeque inputBuffer = new ArrayDeque<>(); + final ArrayDeque outputBuffer = new ArrayDeque<>(); + private boolean streamsClosed = false; // When programme ends, this will be set true. + + // OUTPUT methods @Override public void print(String s) { @@ -48,10 +49,11 @@ public void printfError(String formattedString, Object... o) { } @Override - public boolean hasInputLines() { - while (inputBuffer.isEmpty()) { + public boolean hasOutputLines() { + // busywait until there is output to be shown to the user + while (outputBuffer.isEmpty()) { Thread.onSpinWait(); - if (programClose) { + if (streamsClosed) { return false; } } @@ -59,19 +61,34 @@ public boolean hasInputLines() { } @Override - public String getNextInputLine() throws YappingBotIoException { + public String getNextOutputLine() throws YappingBotIoException { + // get output to be shown to the user try { - return inputBuffer.poll(); + return outputBuffer.poll(); } catch (Exception e) { throw new YappingBotIoException(e.getMessage()); } } + // INPUT methods + + /** + * Pushes String input into the input buffer to be processed by Yappingbot. + * + * @param input String to be inputted + */ @Override - public boolean hasOutputLines() { - while (outputBuffer.isEmpty()) { + public void pushInputLine(String input) { + // get output to be shown to the user + inputBuffer.add(input); + } + + @Override + public boolean hasInputLines() { + // busywait until there is input from user to be processed + while (inputBuffer.isEmpty()) { Thread.onSpinWait(); - if (programClose) { + if (streamsClosed) { return false; } } @@ -79,30 +96,23 @@ public boolean hasOutputLines() { } @Override - public String getNextOutputLine() throws YappingBotIoException { + public String getNextInputLine() throws YappingBotIoException { + // get input from user to be processed try { - return outputBuffer.poll(); + return inputBuffer.poll(); } catch (Exception e) { throw new YappingBotIoException(e.getMessage()); } } - /** - * Pushes String input into the input buffer to be processed by Yappingbot. - * - * @param input String to be inputted - */ - public void pushInputLine(String input) { - inputBuffer.add(input); - } - + // HELPER methods /** * Signals UiGui to close all inputs and outputs. * - * @param programClose Boolean of whether the programme has ended + * @param streamsClosed Boolean of whether the programme has ended */ - public void setProgramClose(boolean programClose) { - this.programClose = programClose; + public void setProgramClose(boolean streamsClosed) { + this.streamsClosed = streamsClosed; } } diff --git a/src/main/resources/view/DialogBox.fxml b/src/main/resources/view/DialogBox.fxml index 9e1d25f616..a889f4dbe4 100644 --- a/src/main/resources/view/DialogBox.fxml +++ b/src/main/resources/view/DialogBox.fxml @@ -4,13 +4,13 @@ - - - - + - + + diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index 2eb4fbafbe..9a540ec2e7 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -8,36 +8,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/src/test/java/yappingbot/ui/UiCliTest.java b/src/test/java/yappingbot/ui/UiCliTest.java index 067d4dddf2..13f67c3103 100644 --- a/src/test/java/yappingbot/ui/UiCliTest.java +++ b/src/test/java/yappingbot/ui/UiCliTest.java @@ -10,7 +10,7 @@ class UiCliTest { - UiCli ui = new UiCli(); + final UiCli ui = new UiCli(); @Test void testPrintError() throws IOException {