forked from nus-cs2103-AY2223S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #527 from yixiann/add-dg-help
Add DG help command sequence diagram and activity diagram
- Loading branch information
Showing
6 changed files
with
150 additions
and
25 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,18 @@ | ||
@startuml | ||
!pragma useVerticalIf on | ||
start | ||
:User enters help command; | ||
if () then ([Specified command not provided]) | ||
:Help window opens and shows | ||
the general help message; | ||
stop | ||
else ( [Specified command provided]) | ||
if () then ([Specified command exist]) | ||
:Help window opens and shows help for | ||
the command with the general help message; | ||
stop | ||
else ([Specified command does not exist]) | ||
:Help window opens and shows invalid command | ||
message with the general help message; | ||
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,110 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Ui UI_COLOR_T1 | ||
participant ":MainWindow" as MainWindow UI_COLOR | ||
participant ":HelpWindow" as HelpWindow UI_COLOR | ||
end box | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":FoodRemParser" as FoodRemParser LOGIC_COLOR | ||
participant ":HelpCommandParser" as HelpCommandParser LOGIC_COLOR | ||
participant "t:HelpCommand" as HelpCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
[-> MainWindow : executeCommand("help new") | ||
activate MainWindow | ||
MainWindow -> LogicManager : execute("help new") | ||
|
||
activate LogicManager | ||
|
||
LogicManager -> FoodRemParser : parseCommand("help new") | ||
activate FoodRemParser | ||
|
||
create HelpCommandParser | ||
FoodRemParser -> HelpCommandParser | ||
activate HelpCommandParser | ||
|
||
HelpCommandParser --> FoodRemParser | ||
deactivate HelpCommandParser | ||
|
||
FoodRemParser -> HelpCommandParser : parse("help new") | ||
activate HelpCommandParser | ||
|
||
create HelpCommand | ||
HelpCommandParser -> HelpCommand | ||
activate HelpCommand | ||
|
||
HelpCommand --> HelpCommandParser : | ||
deactivate HelpCommand | ||
|
||
HelpCommandParser --> FoodRemParser : | ||
deactivate HelpCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
HelpCommandParser -[hidden]-> FoodRemParser | ||
destroy HelpCommandParser | ||
|
||
FoodRemParser --> LogicManager : | ||
deactivate FoodRemParser | ||
|
||
LogicManager -> HelpCommand : execute(model) | ||
activate HelpCommand | ||
|
||
create CommandResult | ||
HelpCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> HelpCommand | ||
deactivate CommandResult | ||
|
||
HelpCommand --> LogicManager | ||
deactivate HelpCommand | ||
|
||
MainWindow <--LogicManager | ||
deactivate LogicManager | ||
|
||
MainWindow -[Hidden]-> HelpCommand | ||
destroy HelpCommand | ||
|
||
MainWindow --> HelpWindow : hide() | ||
activate HelpWindow | ||
|
||
HelpWindow --> MainWindow | ||
deactivate HelpWindow | ||
|
||
MainWindow --> CommandResult : getHelpText() | ||
activate CommandResult | ||
|
||
CommandResult --> MainWindow : helpText | ||
deactivate CommandResult | ||
|
||
MainWindow --> HelpWindow : setMessageToDisplay(helpText) | ||
activate HelpWindow | ||
|
||
HelpWindow --> MainWindow | ||
deactivate HelpWindow | ||
|
||
MainWindow --> MainWindow : handleHelpCommand() | ||
activate MainWindow | ||
|
||
MainWindow --> HelpWindow : isShowing() | ||
activate HelpWindow | ||
|
||
HelpWindow --> MainWindow | ||
deactivate HelpWindow | ||
|
||
MainWindow --> HelpWindow : show() | ||
activate HelpWindow | ||
|
||
HelpWindow --> MainWindow | ||
deactivate HelpWindow | ||
|
||
MainWindow --> MainWindow | ||
deactivate MainWindow | ||
|
||
[<--MainWindow | ||
deactivate MainWindow | ||
|
||
@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.
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