Skip to content

Commit

Permalink
Merge pull request AY2324S1-CS2103T-T13-0#237 from yyyaohhh/master
Browse files Browse the repository at this point in the history
Update DeveloperGuide.md
  • Loading branch information
rocketninja7 authored Nov 12, 2023
2 parents 73c9e67 + 62eeed4 commit 9aeb34c
Show file tree
Hide file tree
Showing 9 changed files with 222 additions and 136 deletions.
253 changes: 191 additions & 62 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/diagrams/CommitActivityDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ start
'Since the beta syntax does not support placing the condition outside the
'diamond we place it as the true branch instead.

if () then ([command commits AddressBook])
if () then ([command commits ModulePlan])
:Purge redundant states;
:Save AddressBook to
addressBookStateList;
:Save ModulePlan to
modulePlanStateList;
else ([else])
endif
stop
Expand Down
6 changes: 3 additions & 3 deletions docs/diagrams/UndoRedoState0.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ skinparam ClassBackgroundColor #FFFFAA
title Initial state

package States {
class State1 as "<u>ab0:AddressBook</u>"
class State2 as "<u>ab1:AddressBook</u>"
class State3 as "<u>ab2:AddressBook</u>"
class State1 as "<u>mp0:ModulePlan</u>"
class State2 as "<u>mp1:ModulePlan</u>"
class State3 as "<u>mp2:AddressBook</u>"
}
State1 -[hidden]right-> State2
State2 -[hidden]right-> State3
Expand Down
8 changes: 4 additions & 4 deletions docs/diagrams/UndoRedoState1.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ skinparam ClassFontColor #000000
skinparam ClassBorderColor #000000
skinparam ClassBackgroundColor #FFFFAA

title After command "delete 5"
title After command "delete CS1010"

package States <<rectangle>> {
class State1 as "<u>ab0:AddressBook</u>"
class State2 as "<u>ab1:AddressBook</u>"
class State3 as "<u>ab2:AddressBook</u>"
class State1 as "<u>mp0:ModulePlan</u>"
class State2 as "<u>mp1:ModulePlan</u>"
class State3 as "<u>mp2:ModulePlan</u>"
}

State1 -[hidden]right-> State2
Expand Down
8 changes: 4 additions & 4 deletions docs/diagrams/UndoRedoState2.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ skinparam ClassFontColor #000000
skinparam ClassBorderColor #000000
skinparam ClassBackgroundColor #FFFFAA

title After command "add n/David"
title After command "add CS2030..."

package States <<rectangle>> {
class State1 as "<u>ab0:AddressBook</u>"
class State2 as "<u>ab1:AddressBook</u>"
class State3 as "<u>ab2:AddressBook</u>"
class State1 as "<u>mp0:ModulePlan</u>"
class State2 as "<u>mp1:ModulePlan</u>"
class State3 as "<u>mp2:ModulePlan</u>"
}

State1 -[hidden]right-> State2
Expand Down
6 changes: 3 additions & 3 deletions docs/diagrams/UndoRedoState3.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ skinparam ClassBackgroundColor #FFFFAA
title After command "undo"

package States <<rectangle>> {
class State1 as "<u>ab0:AddressBook</u>"
class State2 as "<u>ab1:AddressBook</u>"
class State3 as "<u>ab2:AddressBook</u>"
class State1 as "<u>mp0:ModulePlan</u>"
class State2 as "<u>mp1:ModulePlan</u>"
class State3 as "<u>mp2:ModulePlan</u>"
}

State1 -[hidden]right-> State2
Expand Down
21 changes: 0 additions & 21 deletions docs/diagrams/UndoRedoState4.puml

This file was deleted.

22 changes: 0 additions & 22 deletions docs/diagrams/UndoRedoState5.puml

This file was deleted.

28 changes: 14 additions & 14 deletions docs/diagrams/UndoSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,42 @@ skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":ModulePlanParser" as ModulePlanParser LOGIC_COLOR
participant "u:UndoCommand" as UndoCommand LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
participant ":VersionedAddressBook" as VersionedAddressBook MODEL_COLOR
participant ":VersionedModulePlan" as VersionedModulePlan MODEL_COLOR
end box
[-> LogicManager : execute(undo)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(undo)
activate AddressBookParser
LogicManager -> ModulePlanParser : parseCommand(undo)
activate ModulePlanParser

create UndoCommand
AddressBookParser -> UndoCommand
ModulePlanParser -> UndoCommand
activate UndoCommand

UndoCommand --> AddressBookParser
UndoCommand --> ModulePlanParser
deactivate UndoCommand

AddressBookParser --> LogicManager : u
deactivate AddressBookParser
ModulePlanParser --> LogicManager : u
deactivate ModulePlanParser

LogicManager -> UndoCommand : execute()
activate UndoCommand

UndoCommand -> Model : undoAddressBook()
UndoCommand -> Model : undoModulePlan()
activate Model

Model -> VersionedAddressBook : undo()
activate VersionedAddressBook
Model -> VersionedModulePlan : undo()
activate VersionedModulePlan

VersionedAddressBook -> VersionedAddressBook :resetData(ReadOnlyAddressBook)
VersionedAddressBook --> Model :
deactivate VersionedAddressBook
VersionedModulePlan -> VersionedModulePlan :resetData(ReadOnlyModulePlan)
VersionedModulePlan --> Model :
deactivate VersionedModulePlan

Model --> UndoCommand
deactivate Model
Expand Down

0 comments on commit 9aeb34c

Please sign in to comment.