package commandFactory;

import taskDo.UpdateSummaryReport;
import commonClasses.StorageList;
import Parser.ParsedResult;
import taskDo.History;


public class CommandActionDelete implements CommandAction{	
	@Override
	public void execute(ParsedResult parsedResult){
		StorageList.getInstance().getTaskList().remove(parsedResult.getTaskDetails());
		History.getUndoTaskHistory().push(parsedResult.getTaskDetails());
		
		UpdateSummaryReport.updateForDelete(parsedResult);
	}

	@Override
	public void undo(ParsedResult parsedResult) {
		StorageList.getInstance().getTaskList().add(parsedResult.getTaskDetails());
		History.getRedoTaskHistory().push(parsedResult.getTaskDetails());
		
		UpdateSummaryReport.updateForDelete(parsedResult);
	}
}

package commandFactory;

import taskDo.UpdateSummaryReport;
import commonClasses.StorageList;
import Parser.ParsedResult;
import taskDo.History;


public class CommandActionDelete implements CommandAction{	
	@Override
	public void execute(ParsedResult parsedResult){
		StorageList.getInstance().getTaskList().remove(parsedResult.getTaskDetails());
		History.getUndoTaskHistory().push(parsedResult.getTaskDetails());
		
		UpdateSummaryReport.updateForDelete(parsedResult);
	}

	@Override
	public void undo(ParsedResult parsedResult) {
		StorageList.getInstance().getTaskList().add(parsedResult.getTaskDetails());
		History.getRedoTaskHistory().push(parsedResult.getTaskDetails());
		
		UpdateSummaryReport.update(parsedResult);
	}
}

correct display for undo edit