package seedu.taskitty.logic;

import javafx.collections.ObservableList;
import seedu.taskitty.commons.core.ComponentManager;
import seedu.taskitty.commons.core.LogsCenter;
import seedu.taskitty.logic.commands.Command;
import seedu.taskitty.logic.commands.CommandResult;
import seedu.taskitty.logic.parser.Parser;
import seedu.taskitty.model.Model;
import seedu.taskitty.model.task.ReadOnlyTask;
import seedu.taskitty.storage.Storage;

import java.util.logging.Logger;

/**
 * The main LogicManager of the app.
 */
public class LogicManager extends ComponentManager implements Logic {
    private final Logger logger = LogsCenter.getLogger(LogicManager.class);

    private final Model model;
    private final Parser parser;

    public LogicManager(Model model, Storage storage) {
        this.model = model;
        this.parser = new Parser();
    }

    @Override
    public CommandResult execute(String commandText) {
        logger.info("----------------[USER COMMAND][" + commandText + "]");
        Command command = parser.parseCommand(commandText);
        command.setData(model);
        return command.execute();
    }

    @Override
    public ObservableList<ReadOnlyTask> getFilteredTaskList() {
        return model.getFilteredTaskList();
    }
}

@@ -299,16 +299,23 @@
 .parser.
+Command
 Parser;%0A
@@ -711,16 +711,23 @@
 e final 
+Command
 Parser p
@@ -844,16 +844,23 @@
 r = new 
+Command
 Parser()

Rename Parser to CommandParser