Skip to content

Commit

Permalink
Format into folder
Browse files Browse the repository at this point in the history
Shift relevant child files into Command folder and child listEntry into entry folders
  • Loading branch information
whitesnowx committed Feb 28, 2024
1 parent 06782e9 commit d2cfe5a
Show file tree
Hide file tree
Showing 26 changed files with 110 additions and 22 deletions.
1 change: 1 addition & 0 deletions src/Test/Java/luna/TaskListTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import org.junit.jupiter.api.Test;

import luna.entry.ListEntryTodo;

public class TaskListTest {
@Test
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/luna/Luna.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package luna;

import luna.command.Command;

/**
* A Luna object represent the application character and attributes.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/luna/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import javafx.scene.image.Image;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.VBox;

import luna.command.DialogBox;


/**
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/luna/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;

import luna.command.Command;
import luna.command.DeadlineCommand;
import luna.command.DeleteCommand;
import luna.command.EventCommand;
import luna.command.ExitCommand;
import luna.command.FindCommand;
import luna.command.InvalidCommand;
import luna.command.ListCommand;
import luna.command.LoadCommand;
import luna.command.MarkCommand;
import luna.command.SaveCommand;
import luna.command.SnoozeCommand;
import luna.command.TodoCommand;
import luna.command.UnmarkCommand;

/**
* Represents the Parser for human text to program commands.
* Handles dissemination of commands depending on the user input, including human errors.
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/luna/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
import java.io.IOException;
import java.time.LocalDate;

import luna.entry.ListEntry;
import luna.entry.ListEntryDeadline;
import luna.entry.ListEntryEvent;
import luna.entry.ListEntryTodo;

/**
* Represents the Storage for saving and loading task.
* Read and Writes the task information into a file to maintain information when the task of the program is deleted.
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/luna/TaskList.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import java.util.ArrayList;

import luna.entry.ListEntry;


/**
* Represents a list to track tasks. A task list contains listEntry to represent the tasks.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/luna/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import java.io.BufferedReader;
import java.io.StringReader;

import luna.entry.ListEntry;

/**
* Handles the interaction between the user and the program. A UI handles the input and output of the program.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;

/**
* Represents a command. The command object has different types and can be executed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package luna;

package luna.command;

import java.time.LocalDate;

import luna.Storage;
import luna.TaskList;
import luna.Ui;
import luna.entry.ListEntryDeadline;

/**
* Represents a deadline command which to add a deadline task to the task list
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;

/**
* Represents a delete command which deletes a task from the task list
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package luna;
package luna.command;

import java.io.IOException;
import java.util.Collections;
Expand All @@ -13,6 +13,7 @@
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.text.Text;
import luna.MainWindow;

/**
* An example of a custom control using FXML.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package luna;
package luna.command;

import java.time.LocalDate;

import luna.Storage;
import luna.TaskList;
import luna.Ui;
import luna.entry.ListEntryEvent;

/**
* Represents an event command which to add an event task to the task list
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;

/**
* Represents an exit command which ends the program
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;
import luna.entry.ListEntry;


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;

/**
* Represents a invalid command which will shows the user what it the error they have committed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;

/**
* Represents a list command which lists out the task in the task list
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;

/**
* Represents a load command loads any task from the storage to the task list
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;

/**
* Represents a mark command. Marks a task in the task list
*/
public class MarkCommand extends Command {
private int index;
private final int index;

/**
* Construct a Command to have Mark command type and assign an index
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;

/**
* Represents a save command. Saves all the task from the task list to the storage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;

/**
* Represents a snooze command which snooze a task from the task list
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;
import luna.entry.ListEntryTodo;

/**
* Represents a to do command which adds a to-do task to the task list
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package luna;
package luna.command;

import luna.Storage;
import luna.TaskList;
import luna.Ui;

/**
* Represents a unmark command. Unmarks a task in the tasklist
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package luna;
package luna.entry;

import java.time.LocalDate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package luna;
package luna.entry;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package luna;
package luna.entry;

import java.time.LocalDate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package luna;
package luna.entry;

/**
* Represent a list entry for a to-do task.
Expand Down

0 comments on commit d2cfe5a

Please sign in to comment.