Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AB3: Tracing Code] Add more headers to section instructions #42

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cb71de9
Edit LogicSequenceDiagram puml to show exact arguments
UdhayaShan1 Jul 7, 2024
6d49bce
Fix LogicSequenceDiagram by showing creation of parser
UdhayaShan1 Jul 7, 2024
16abf00
Add new edit sequence puml with MainWindow and model for future use
UdhayaShan1 Jul 7, 2024
ec55e13
Update tracingcode.md with h3 css style added
UdhayaShan1 Jul 7, 2024
005583c
Merge branch 'master' into tracing-code-add-headers
UdhayaShan1 Jul 7, 2024
464e91a
Edit arguments
UdhayaShan1 Jul 8, 2024
5ad51a5
Fix EditSequenceDiagramWithMainWindow png and remove html anchor
UdhayaShan1 Jul 13, 2024
9212c14
Edit LogicSequence puml to show execution and add annotated images
UdhayaShan1 Jul 13, 2024
a65f636
Add a logic sequence diagram only with mainwindow and logicmanager
UdhayaShan1 Jul 13, 2024
9f8f897
Add remaining headers and diagrams
UdhayaShan1 Jul 13, 2024
2990596
Update image
UdhayaShan1 Jul 13, 2024
4cfab7b
Merge branch 'master' into tracing-code-add-headers
UdhayaShan1 Jul 27, 2024
8fb8f61
Remove redundant lines and custom css
UdhayaShan1 Jul 27, 2024
5fc1be6
Updated tracing code high level sequence diagram description
UdhayaShan1 Jul 27, 2024
da6ae49
Removed MainWindow from puml to not overlap components
UdhayaShan1 Jul 27, 2024
3327fde
Misc change
UdhayaShan1 Jul 27, 2024
122ca7d
Add double quotes for puml method call arguments
UdhayaShan1 Jul 27, 2024
42c96b5
Add label content and change label names to "T<no>" in bold
UdhayaShan1 Jul 27, 2024
66cca5e
Making spacing consistent
UdhayaShan1 Jul 27, 2024
451b0fe
Update label content to be clearer
UdhayaShan1 Jul 27, 2024
e5e4331
Remove unnecessary spacing and fix typos
UdhayaShan1 Jul 27, 2024
e7db74d
Merge branch 'master' into tracing-code-add-headers
UdhayaShan1 Jul 27, 2024
ba92d2f
Added deletion to puml and misc change
UdhayaShan1 Jul 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 113 additions & 32 deletions tutorials/ab3TracingCode.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions tutorials/images/style.puml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
!define LOGIC_COLOR_T2 #6A6ADC
!define LOGIC_COLOR_T3 #1616B0
!define LOGIC_COLOR_T4 #101086
!define LOGIC_COLOR_T5 #adbc40

!define MODEL_COLOR #9D0012
!define MODEL_COLOR_T1 #F97181
!define MODEL_COLOR_T2 #E41F36
!define MODEL_COLOR_T3 #7B000E
!define MODEL_COLOR_T4 #51000A
!define MODEL_COLOR_T5 #c6d4c0

!define STORAGE_COLOR #A38300
!define STORAGE_COLOR_T1 #FFE374
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions tutorials/images/tracing/EditSequenceDiagramWithMainWindow.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
@startuml
!include ../style.puml
skinparam ArrowFontStyle plain

box Ui MODEL_COLOR_T5
participant "m:MainWindow" as MainWindow LOGIC_COLOR_T5

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":EditCommandParser" as EditCommandParser LOGIC_COLOR
participant "d:EditCommand" as EditCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant "m:Model" as Model MODEL_COLOR
end box



--> MainWindow
activate MainWindow
MainWindow -> LogicManager : execute("edit 1 n/Alice Yeoh")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("edit 1 n/Alice Yeoh")
activate AddressBookParser

create EditCommandParser
AddressBookParser -> EditCommandParser
activate EditCommandParser

EditCommandParser --> AddressBookParser
deactivate EditCommandParser

AddressBookParser -> EditCommandParser : parse("1 n/Alice Yeoh")
activate EditCommandParser

create EditCommand
EditCommandParser -> EditCommand
activate EditCommand

EditCommand --> EditCommandParser :
deactivate EditCommand

EditCommandParser --> AddressBookParser : d
deactivate EditCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
EditCommandParser -[hidden]-> AddressBookParser
destroy EditCommandParser

AddressBookParser --> LogicManager : d
deactivate AddressBookParser

LogicManager -> EditCommand : execute(m)
activate EditCommand

EditCommand -> Model : ...
activate Model

Model --> EditCommand
deactivate Model

create CommandResult
EditCommand -> CommandResult
activate CommandResult

CommandResult --> EditCommand
deactivate CommandResult

EditCommand --> LogicManager : r
deactivate EditCommand

LogicManager --> MainWindow
deactivate LogicManager

[<-- MainWindow
deactivate MainWindow
@enduml
Binary file added tutorials/images/tracing/LogicSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions tutorials/images/tracing/LogicSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ Participant "command:EditCommand" as ec LOGIC_COLOR

[-> logic : execute
activate logic
logic -> abp ++: parseCommand(commandText)
logic -> abp ++: parseCommand(edit 1 n/Alice Yeoh)
create ecp
abp -> ecp
abp -> ecp ++: parse(arguments)
activate ecp
ecp -> abp
deactivate ecp
abp -> ecp ++: parse(1 n/Alice Yeoh)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
abp -> ecp ++: parse(1 n/Alice Yeoh)
abp -> ecp ++: parse("1 n/Alice Yeoh")

Check other places as well.

create ec
ecp -> ec ++: index, editPersonDescriptor
ecp -> ec ++: 1, n/Alice Yeoh
ec --> ecp --
ecp --> abp --: command
abp --> logic --: command
[<-- logic

@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions tutorials/images/tracing/LogicSequenceDiagramImproved.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@startuml
!include ../style.puml
skinparam ArrowFontStyle plain

Participant ":LogicManager" as logic LOGIC_COLOR
Participant ":AddressBookParser" as abp LOGIC_COLOR
Participant ":EditCommandParser" as ecp LOGIC_COLOR
Participant "command:EditCommand" as ec LOGIC_COLOR

-> logic : execute("edit 1 n/Alice Yeoh")
activate logic
logic -> abp ++: parseCommand("edit 1 n/Alice Yeoh")
create ecp
abp -> ecp
activate ecp
ecp --> abp
deactivate ecp
abp -> ecp ++: parse("1 n/Alice Yeoh")
create ec
ecp -> ec ++: 1, editPersonDescriptor
ec --> ecp --
ecp --> abp --: command
ecp -[hidden]-> abp --: command
destroy ecp


abp --> logic --: command

logic -> ec : execute
activate ec
ec --> logic : commandResult
deactivate ec
ec -[hidden]-> logic : commandResult
destroy ec

<-- logic :commandResult
deactivate logic

@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@startuml
!include ../style.puml
skinparam ArrowFontStyle plain

Participant ":MainWindow" as main LOGIC_COLOR
Participant ":LogicManager" as logic LOGIC_COLOR

main -> logic : execute("edit 1 n/Alice Yeoh")
activate logic

logic -> : ...
logic <-- : commandResult
logic --> main --: commandResult
deactivate logic

@enduml
Binary file added tutorials/images/tracing/VariablesAnnotated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.