forked from nus-cs2103-AY2425S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into delete-tag
- Loading branch information
Showing
27 changed files
with
391 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":CampusConnectParser" as CampusConnectParser LOGIC_COLOR | ||
participant ":DeleteTagCommandParser" as DeleteTagCommandParser LOGIC_COLOR | ||
participant "d:DeleteTagCommand" as DeleteTagCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant "m:Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("deletetag 1 t/test") | ||
activate LogicManager | ||
|
||
LogicManager -> CampusConnectParser : parseCommand("deletetag 1 t/test") | ||
activate CampusConnectParser | ||
|
||
create DeleteTagCommandParser | ||
CampusConnectParser -> DeleteTagCommandParser | ||
activate DeleteTagCommandParser | ||
|
||
DeleteTagCommandParser --> CampusConnectParser | ||
deactivate DeleteTagCommandParser | ||
|
||
CampusConnectParser -> DeleteTagCommandParser: parse("1 t/test") | ||
activate DeleteTagCommandParser | ||
|
||
create DeleteTagCommand | ||
DeleteTagCommandParser -> DeleteTagCommand | ||
activate DeleteTagCommand | ||
|
||
DeleteTagCommand --> DeleteTagCommandParser : | ||
deactivate DeleteTagCommand | ||
|
||
DeleteTagCommandParser --> CampusConnectParser : d | ||
DeleteTagCommandParser -[hidden]-> CampusConnectParser | ||
destroy DeleteTagCommandParser | ||
|
||
CampusConnectParser --> LogicManager : d | ||
deactivate CampusConnectParser | ||
|
||
LogicManager -> DeleteTagCommand : execute(m) | ||
activate DeleteTagCommand | ||
|
||
DeleteTagCommand -> Model : getFilteredPersonList() | ||
activate Model | ||
|
||
Model --> DeleteTagCommand : lastShownList | ||
deactivate Model | ||
|
||
DeleteTagCommand -> Model : get(index) | ||
activate Model | ||
|
||
Model --> DeleteTagCommand : person | ||
deactivate Model | ||
|
||
DeleteTagCommand -> Model : deletePersonTag(person, tag) | ||
activate Model | ||
|
||
Model --> DeleteTagCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
DeleteTagCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> DeleteTagCommand : r | ||
deactivate CommandResult | ||
|
||
DeleteTagCommand --> LogicManager | ||
deactivate DeleteTagCommand | ||
|
||
[<-- LogicManager | ||
deactivate LogicManager | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/seedu/address/logic/commands/UndoCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
import seedu.address.model.Model; | ||
|
||
/** | ||
* Recovers the previous version of CampusConnect. | ||
*/ | ||
public class UndoCommand extends Command { | ||
public static final String COMMAND_WORD = "undo"; | ||
public static final String MESSAGE_SUCCESS = "Campus Connect has recovered!"; | ||
|
||
@Override | ||
public CommandResult execute(Model model) { | ||
requireNonNull(model); | ||
model.undoCampusConnect(); | ||
return new CommandResult(MESSAGE_SUCCESS); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object other) { | ||
if (other == this) { | ||
return true; | ||
} | ||
|
||
if (!(other instanceof UndoCommand)) { | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.