/** @@author A0142130A **/
package seedu.taskell.logic.commands;

import seedu.taskell.commons.core.EventsCenter;
import seedu.taskell.commons.events.model.DisplayListChangedEvent;

/** Lists a list of previous commands available for Undo operation
 * */
public class ListUndoCommand extends Command {
    
    public static final String COMMAND_WORD = "list-undo";

    public static final String MESSAGE_SUCCESS = "Listed all commands available for undo.";

    @Override
    public CommandResult execute() {
        indicateDisplayListChanged();
        return new CommandResult(MESSAGE_SUCCESS);
    }

    public void indicateDisplayListChanged() {
        EventsCenter.getInstance().post(
                new DisplayListChangedEvent(UndoCommand.getListOfCommandHistoryText()));
    }

}

@@ -451,16 +451,215 @@
  undo.%22;
+%0A    %0A    private static ListUndoCommand self;%0A    %0A    public static ListUndoCommand getInstance() %7B%0A    %09if (self == null) %7B%0A    %09%09self = new ListUndoCommand();%0A    %09%7D%0A    %09%0A    %09return self;%0A    %7D
 %0A%0A    @O

add singleton method