-
Notifications
You must be signed in to change notification settings - Fork 26
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 Model
tracing code
#45
base: master
Are you sure you want to change the base?
Changes from all commits
07e8048
14512d0
d8b9a8b
48815bb
1aa9392
a6fbba0
8224fe7
ed88ddb
47e2cab
d516315
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
@startuml | ||
!include ../style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":EditCommand" as EditCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
participant "filteredPersons:FilteredList<Person>" as ObservableList MODEL_COLOR | ||
box Model MODEL_COLOR_T1 | ||
participant "model:ModelManager" as Model MODEL_COLOR | ||
end box | ||
|
||
-> EditCommand : execute(model) | ||
activate EditCommand | ||
|
||
|
||
|
||
EditCommand -> Model : getFilteredPersonList() | ||
activate Model | ||
Model --> EditCommand : filteredPersons | ||
deactivate Model | ||
|
||
|
||
EditCommand -> ObservableList : get(index) | ||
activate ObservableList | ||
ObservableList --> EditCommand : personToEdit | ||
deactivate ObservableList | ||
|
||
EditCommand -> EditCommand : createEditedPerson(...) | ||
activate EditCommand | ||
EditCommand --> EditCommand: editedPerson | ||
deactivate EditCommand | ||
|
||
EditCommand -> EditCommand : check for duplicates | ||
activate EditCommand | ||
deactivate EditCommand | ||
|
||
EditCommand -> Model : setPerson(...) | ||
activate Model | ||
Model --> EditCommand | ||
deactivate Model | ||
|
||
EditCommand -> Model : updateFilteredPersonList(...) | ||
activate Model | ||
deactivate ObservableList | ||
Model --> EditCommand | ||
deactivate Model | ||
|
||
|
||
create CommandResult | ||
EditCommand -> CommandResult | ||
activate CommandResult | ||
CommandResult --> EditCommand | ||
deactivate CommandResult | ||
|
||
[<-- EditCommand: r | ||
deactivate EditCommand | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changes:
You can tweak further, as needed. @startuml
!include ../style.puml
skinparam ArrowFontStyle plain
box Logic LOGIC_COLOR_T1
participant ":EditCommand" as EditCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box
participant "filteredPersons:FilteredList<Person>" as ObservableList MODEL_COLOR
box Model MODEL_COLOR_T1
participant "model:ModelManager" as Model MODEL_COLOR
end box
-> EditCommand : execute(model)
activate EditCommand
EditCommand -> Model : getFilteredPersonList()
activate Model
Model --> EditCommand : filteredPersons
deactivate Model
EditCommand -> ObservableList : get(index)
activate ObservableList
ObservableList --> EditCommand : personToEdit
deactivate ObservableList
EditCommand -> EditCommand : createEditedPerson(personToEdit, editPersonDescriptor)
activate EditCommand
EditCommand --> EditCommand: editedPerson
deactivate EditCommand
EditCommand -> EditCommand : check for duplicates
activate EditCommand
deactivate EditCommand
EditCommand -> Model : setPerson(personToEdit, editedPerson)
activate Model
Model --> EditCommand
deactivate Model
EditCommand -> Model : updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS)
activate Model
deactivate ObservableList
Model --> EditCommand
deactivate Model
create CommandResult
EditCommand -> CommandResult
activate CommandResult
CommandResult --> EditCommand
deactivate CommandResult
[<-- EditCommand: r
deactivate EditCommand
@enduml
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Prof, will update existing puml with this and work on it as needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I will omit the arguments as it can referred in the code and will not come out too overwhelming |
||
@enduml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think the arrows for method call should be solid lines instead of dashed lines (since those indicate returns)
eg.
Additionaklly, perhaps the call to
setPredicate
can be ommitted?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep your right, was a mistake to put dotted arrow
Yes seems unnecessary, I will remove that call
Thanks!