Skip to content

Commit

Permalink
Add documentation for command history feature
Browse files Browse the repository at this point in the history
  • Loading branch information
aureliony committed Apr 14, 2024
1 parent 3367d62 commit 201cb8d
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions docs/diagrams/CommandHistorySequenceDiagram.puml
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

0 comments on commit 201cb8d

Please sign in to comment.