forked from AY2324S1-CS2103T-T17-3/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update DG with implementation details
- Loading branch information
1 parent
db328c6
commit a7231f8
Showing
9 changed files
with
443 additions
and
189 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,71 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
box Ui UI_COLOR_T1 | ||
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 ":ThemeCommandParser" as ThemeCommandParser LOGIC_COLOR | ||
participant "d:ThemeCommand" as ThemeCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
[-> Ui : | ||
activate Ui | ||
|
||
Ui -> LogicManager : execute\n("theme\ndark") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand\n("theme dark") | ||
activate AddressBookParser | ||
|
||
create ThemeCommandParser | ||
AddressBookParser -> ThemeCommandParser | ||
activate ThemeCommandParser | ||
|
||
ThemeCommandParser --> AddressBookParser | ||
deactivate ThemeCommandParser | ||
|
||
AddressBookParser -> ThemeCommandParser : parse("dark") | ||
activate ThemeCommandParser | ||
|
||
create ThemeCommand | ||
ThemeCommandParser -> ThemeCommand | ||
activate ThemeCommand | ||
|
||
ThemeCommand --> ThemeCommandParser : c | ||
deactivate ThemeCommand | ||
|
||
ThemeCommandParser --> AddressBookParser : c | ||
deactivate ThemeCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
ThemeCommandParser -[hidden]-> AddressBookParser | ||
destroy ThemeCommandParser | ||
|
||
AddressBookParser --> LogicManager : c | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> ThemeCommand : execute() | ||
activate ThemeCommand | ||
|
||
create CommandResult | ||
ThemeCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> ThemeCommand : result | ||
deactivate CommandResult | ||
|
||
ThemeCommand --> LogicManager : result | ||
deactivate ThemeCommand | ||
|
||
LogicManager --> Ui : result | ||
deactivate LogicManager | ||
|
||
Ui --> Ui : handle\nChange\nTheme() | ||
|
||
[<--Ui | ||
deactivate Ui | ||
@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,34 @@ | ||
@startuml | ||
skin rose | ||
skinparam ActivityFontSize 15 | ||
skinparam ArrowFontSize 12 | ||
start | ||
:User runs edit-s command; | ||
|
||
'Since the beta syntax does not support placing the condition outside the | ||
'diamond we place it as the true branch instead. | ||
|
||
:Parse user input; | ||
|
||
if () then ([input is valid]) | ||
:Construct EditScheduleDescriptor object; | ||
:Construct EditScheduleCommand object; | ||
:Return back to LogicManager; | ||
:LogicManager executes EditScheduleCommand; | ||
:Construct edited Schedule; | ||
if () then ([edited schedule does not already exist]) | ||
if () then ([edited schedule does not clash with existing schedule]) | ||
:Replace schedule with edited schedule in ScheduleList; | ||
:Update UI; | ||
else ([else]) | ||
:Display clashing schedule error message; | ||
endif | ||
else ([else]) | ||
:Display duplicate schedule error message; | ||
endif | ||
else ([else]) | ||
:Display error message; | ||
|
||
endif | ||
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,85 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":EditScheduleCommandParser" as EditScheduleCommandParser LOGIC_COLOR | ||
participant "e:EditScheduleDescriptor" as EditScheduleDescriptor LOGIC_COLOR | ||
participant "d:EditScheduleCommand" as EditScheduleCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
participant "editedSchedule:Schedule" as EditedSchedule MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("edit-s 1 st/st/2023-09-15T09:00") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("edit-s 1 st/2023-09-15T09:00") | ||
activate AddressBookParser | ||
|
||
create EditScheduleCommandParser | ||
AddressBookParser -> EditScheduleCommandParser | ||
activate EditScheduleCommandParser | ||
|
||
EditScheduleCommandParser --> AddressBookParser | ||
deactivate EditScheduleCommandParser | ||
|
||
AddressBookParser -> EditScheduleCommandParser : parse("1 st/2023-09-15T09:00") | ||
activate EditScheduleCommandParser | ||
|
||
create EditScheduleDescriptor | ||
EditScheduleCommandParser -> EditScheduleDescriptor | ||
activate EditScheduleDescriptor | ||
|
||
EditScheduleDescriptor --> EditScheduleCommandParser : e | ||
deactivate EditScheduleDescriptor | ||
|
||
create EditScheduleCommand | ||
EditScheduleCommandParser -> EditScheduleCommand | ||
activate EditScheduleCommand | ||
|
||
EditScheduleCommand --> EditScheduleCommandParser : d | ||
deactivate EditScheduleCommand | ||
|
||
EditScheduleCommandParser --> AddressBookParser : d | ||
deactivate EditScheduleCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
EditScheduleCommandParser -[hidden]-> AddressBookParser | ||
destroy EditScheduleCommandParser | ||
|
||
AddressBookParser --> LogicManager : d | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> EditScheduleCommand : execute() | ||
activate EditScheduleCommand | ||
|
||
create EditedSchedule | ||
EditScheduleCommand -> EditedSchedule ++ | ||
return | ||
EditScheduleCommand -> Model ++ : hasSchedule(editedSchedule) | ||
return | ||
EditScheduleCommand -> Model ++ : setSchedule(scheduleToEdit, editedSchedule) | ||
return | ||
EditScheduleCommand -> Model ++ : updateFilteredScheduleList() | ||
deactivate Model | ||
|
||
deactivate Model | ||
|
||
create CommandResult | ||
EditScheduleCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> EditScheduleCommand | ||
deactivate CommandResult | ||
|
||
EditScheduleCommand --> LogicManager : result | ||
deactivate EditScheduleCommand | ||
|
||
[<--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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.