forked from nus-cs2103-AY2122S1/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 DG-additions
- Loading branch information
Showing
5 changed files
with
177 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@startuml | ||
'https://plantuml.com/activity-diagram-beta | ||
|
||
start | ||
:UI receives keystroke; | ||
switch() | ||
case ([keystroke `UP`]) | ||
:Attempts to retrieves previous command; | ||
if () then ([has command history]) | ||
if () then ([has previous command]) | ||
:Displays previous command; | ||
else ([no previous command]) | ||
:Displays last command in history; | ||
endif | ||
else ([no command history]) | ||
:Displays nothing; | ||
endif | ||
case ([keystroke `DOWN`]) | ||
:Attempts to retrieves next command; | ||
if () then ([has command history]) | ||
if () then ([has next command]) | ||
:Displays next command; | ||
else ([no next command]) | ||
:Displays nothing; | ||
endif | ||
else ([no command history]) | ||
:Displays nothing; | ||
endif | ||
case ([other keystrokes]) | ||
:Retrieves Command Assistant; | ||
endswitch | ||
|
||
|
||
stop | ||
|
||
@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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box UI UI_COLOR | ||
participant "UI" as UI UI_COLOR | ||
end box | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":HelpCommandParser" as HelpCommandParser LOGIC_COLOR | ||
participant "h:HelpCommand" as HelpCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
UI -> LogicManager : execute("help add") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("help add") | ||
activate AddressBookParser | ||
|
||
create HelpCommandParser | ||
AddressBookParser -> HelpCommandParser | ||
activate HelpCommandParser | ||
|
||
HelpCommandParser --> AddressBookParser | ||
deactivate HelpCommandParser | ||
|
||
AddressBookParser -> HelpCommandParser : parse("add") | ||
activate HelpCommandParser | ||
|
||
create HelpCommand | ||
HelpCommandParser -> HelpCommand | ||
activate HelpCommand | ||
|
||
HelpCommand --> HelpCommandParser : h | ||
deactivate HelpCommand | ||
|
||
HelpCommandParser --> AddressBookParser : h | ||
deactivate HelpCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
HelpCommandParser -[hidden]-> AddressBookParser | ||
destroy HelpCommandParser | ||
|
||
AddressBookParser --> LogicManager : h | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> HelpCommand : execute() | ||
activate HelpCommand | ||
|
||
create CommandResult | ||
HelpCommand -> CommandResult | ||
activate CommandResult | ||
CommandResult -> HelpCommand | ||
deactivate CommandResult | ||
|
||
|
||
HelpCommand --> LogicManager : result | ||
deactivate HelpCommand | ||
|
||
UI <--LogicManager: result | ||
deactivate LogicManager | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
HelpCommand -[hidden]-> LogicManager | ||
destroy HelpCommand | ||
|
||
|
||
|
||
@enduml |
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.