forked from nus-cs2103-AY2324S2/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.
Add documentation for command history feature
- Loading branch information
Showing
1 changed file
with
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box UI UI_COLOR_T1 | ||
participant ":CommandBox" as CommandBox UI_COLOR | ||
participant ":CommandExecutor" as CommandExecutor UI_COLOR | ||
end box | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":CommandHistory" as CommandHistory LOGIC_COLOR | ||
end box | ||
|
||
'box JavaFX JAVAFX_COLOR_T1 | ||
participant ":TextField" as TextField JAVAFX_COLOR | ||
'end box | ||
|
||
-> CommandBox : handleKeyPressed(event) | ||
activate CommandBox | ||
|
||
CommandBox -> CommandExecutor : getPreviousCommandText() | ||
activate CommandExecutor | ||
|
||
CommandExecutor -> LogicManager : getPreviousCommandText() | ||
activate LogicManager | ||
|
||
LogicManager -> CommandHistory : getPrevious() | ||
activate CommandHistory | ||
|
||
CommandHistory --> LogicManager : commandText | ||
deactivate CommandHistory | ||
|
||
LogicManager --> CommandExecutor : commandText | ||
deactivate LogicManager | ||
|
||
CommandExecutor --> CommandBox : commandText | ||
deactivate CommandExecutor | ||
|
||
CommandBox -> TextField : setText(commandText) | ||
activate TextField | ||
|
||
TextField --> CommandBox | ||
deactivate TextField | ||
|
||
<-- CommandBox | ||
deactivate CommandBox | ||
|
||
@enduml |