package seedu.oneline.logic.commands;

import seedu.oneline.commons.core.UnmodifiableObservableList;
import seedu.oneline.commons.exceptions.IllegalValueException;
import seedu.oneline.model.tag.Tag;
import seedu.oneline.model.task.ReadOnlyTask;

public class DeleteTagCommand extends DeleteCommand {

    private final String tagName;
    
    public DeleteTagCommand(String tagName) {
        this.tagName = tagName;
    }
    
    public static DeleteTagCommand createFromArgs(String args) throws IllegalValueException {
        String tagName = args.substring(1);
        if (!Tag.isValidTagName(tagName)) {
            throw new IllegalValueException(Tag.MESSAGE_TAG_CONSTRAINTS + " : " + args);
        } else {
            return new DeleteTagCommand(tagName);
        }
    }
    
    @Override
    public CommandResult execute() {
        return null; //stub
    }
    
    @Override
    public boolean canUndo() {
        return true;
    }
    
}

@@ -32,16 +32,71 @@
 mands;%0A%0A
+import javafx.collections.transformation.FilteredList;%0A
 import s
@@ -900,27 +900,355 @@
     
-return null; //stub
+FilteredList%3CTag%3E tagList = model.getTagList().filtered(tag -%3E tag.getTagName().equals(tagName));%0A        if (tagList.isEmpty())%7B%0A            return new CommandResult(String.format(Tag.MESSAGE_INVALID_TAG, tagName));%0A        %7D else %7B%0A            // TODO%0A            return new CommandResult(MESSAGE_DELETE_CAT_SUCCESS + %22 : %22 + tagName);%0A        %7D
 %0A   

Add execute stub