package seedu.ezdo.logic.parser;

import static seedu.ezdo.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;

import java.util.ArrayList;

import seedu.ezdo.logic.commands.Command;
import seedu.ezdo.logic.commands.DoneCommand;
import seedu.ezdo.logic.commands.IncorrectCommand;


/**
 * Parses input arguments and creates a new DoneCommand object
 */
public class DoneCommandParser {

    /**
     * Parses the given {@code String} of arguments in the context of the DoneCommand
     * and returns an DoneCommand object for execution.
     */
    public Command parse(String args) {

        if (("").equals(args)) {
            return new DoneCommand();
        }

        ArrayList<Integer> indexes = ParserUtil.parseIndexes(args);
        if (indexes.isEmpty()) {
            return new IncorrectCommand(
                    String.format(MESSAGE_INVALID_COMMAND_FORMAT, DoneCommand.MESSAGE_USAGE));
        }

        return new DoneCommand(indexes);
    }

}

@@ -118,29 +118,47 @@
 ort 
-java.util.ArrayList;%0A
+seedu.ezdo.logic.commands.AliasCommand;
 %0Aimp
@@ -200,54 +200,8 @@
 nd;%0A
-import seedu.ezdo.logic.commands.DoneCommand;%0A
 impo
@@ -333,20 +333,21 @@
 c class 
-Done
+Alias
 CommandP
@@ -351,24 +351,119 @@
 ndParser %7B%0A%0A
+    private static final int COMMAND_INDEX = 0;%0A    private static final int ALIAS_INDEX = 1;%0A%0A
     /**%0A    
@@ -532,20 +532,21 @@
  of the 
-Done
+Alias
 Command%0A
@@ -567,20 +567,21 @@
 urns an 
-Done
+Alias
 Command 
@@ -650,25 +650,24 @@
 args) %7B%0A
-%0A
         
 if ((%22%22)
@@ -662,115 +662,32 @@
     
-if ((%22%22).equals(args)) %7B%0A            return new DoneCommand();%0A        %7D%0A%0A        ArrayList%3CInteger%3E indexe
+String%5B%5D commandArgument
 s = 
@@ -706,14 +706,19 @@
 arse
-Indexe
+CommandAlia
 s(ar
@@ -738,25 +738,36 @@
 if (
-indexes.isEmpty()
+commandArguments.length == 0
 ) %7B%0A
@@ -873,20 +873,21 @@
 FORMAT, 
-Done
+Alias
 Command.
@@ -913,16 +913,127 @@
       %7D%0A
+        String command = commandArguments%5BCOMMAND_INDEX%5D;%0A        String alias = commandArguments%5BALIAS_INDEX%5D;
 %0A       
@@ -1048,20 +1048,21 @@
 new 
-Done
+Alias
 Command(
 inde
@@ -1061,14 +1061,21 @@
 and(
-indexe
+command, alia
 s);%0A

Update AliasCommandParser implementation