forked from nus-cs2103-AY2122S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update developer guide for pin command #90
Merged
yucheng11122017
merged 4 commits into
AY2122S1-CS2103-F09-4:master
from
yucheng11122017:pin-command
Oct 22, 2021
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
4b17c06
Update developer guide for pinCommand
yucheng11122017 afb4635
Merge branch 'master' of https://github.com/AY2122S1-CS2103-F09-4/tp …
yucheng11122017 7cd77a5
Add newline to diagram
yucheng11122017 a9d2205
Include UI in sequence diagram
yucheng11122017 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":PinCommandParser" as PinCommandParser LOGIC_COLOR | ||
participant "d:PinCommand" as PinCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("pin 1") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("pin 1") | ||
activate AddressBookParser | ||
|
||
create PinCommandParser | ||
AddressBookParser -> PinCommandParser | ||
activate PinCommandParser | ||
|
||
PinCommandParser --> AddressBookParser | ||
deactivate PinCommandParser | ||
|
||
AddressBookParser -> PinCommandParser : parse("1") | ||
activate PinCommandParser | ||
|
||
create PinCommand | ||
PinCommandParser -> PinCommand | ||
activate PinCommand | ||
|
||
PinCommand --> PinCommandParser : d | ||
deactivate PinCommand | ||
|
||
PinCommandParser --> AddressBookParser : d | ||
deactivate PinCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
PinCommandParser -[hidden]-> AddressBookParser | ||
destroy PinCommandParser | ||
|
||
AddressBookParser --> LogicManager : d | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> PinCommand : execute() | ||
activate PinCommand | ||
|
||
PinCommand -> Model : getFilteredPersonList() | ||
activate Model | ||
Model --> PinCommand : filteredPersonList | ||
deactivate Model | ||
|
||
PinCommand -> PinCommand : createPinnedPerson(personToPin) | ||
activate PinCommand | ||
PinCommand --> PinCommand : pinnedPerson | ||
deactivate PinCommand | ||
|
||
create CommandResult | ||
PinCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> PinCommand | ||
deactivate CommandResult | ||
|
||
PinCommand -> Model : setPerson(originalPerson, pinnedPerson) | ||
activate Model | ||
Model --> PinCommand | ||
deactivate Model | ||
|
||
PinCommand --> LogicManager : result | ||
deactivate PinCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commands also have an execute method which might get confusing
consider labelling this as user input instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I added UI inside so its clearer :)