kanje / bosce

boost::statechart extractor
Boost Software License 1.0
27 stars 4 forks source link

Handle history states #12

Closed kanje closed 2 years ago

EVictorson commented 2 years ago

Following the same workflow as before I get the following error when trying to generate a .pu and .png:

$ plantuml uml_stopwatch_handle_history_states.pu Error line 4 in file: /home/eric2/Projects/play/boost_state_charts/statechart/example/Camera/uml_stopwatch_handle_history_states.pu Some diagram description contains errors and here's the .png plantuml generates from that .pu: uml_stopwatch_handle_history_states

EVictorson commented 2 years ago

Here's the contents of the associated uml diagram file:

@startuml note "Camera\nGenerated on 20.12.2021" as NoteGenerated #A2F2A2 [*] --> 2 state "NotShooting" as 2 { [H*] --> 3 [*] --> 3 state "Configuring" as 4 { } 4-->3 : EvConfig\n state "Idle" as 3 { } 3-->4 : EvConfig\n } 2-->5 : EvShutterHalf\n state "Shooting" as 5 { [*] --> 6 state "Focused" as 7 { } 7-->7 : EvShutterFull\n 7-->8 : EvShutterFull\n state "Focusing" as 6 { } 6 : Deferrals: 6 : * EvShutterFull 6-->7 : EvInFocus\n state "Storing" as 8 { } } 5-->2[H*] : EvShutterRelease\n @enduml Screenshot from 2021-12-20 23-03-22

kanje commented 2 years ago

Deep history support seems to be introduced in PlantUML V1.2020.11 (see this PR). Which version do you use? Should I implement a fallback with "normal states"?

P.S. The picture from the bug report discussion is generated from this code with [H*].

EVictorson commented 2 years ago

Ah, I figured a plantuml version difference was the issue. I'm using 1.2018.13 since that's the recommended package for ubuntu 20.04, but I can see if 1.2020.11 will work for me.

EVictorson commented 2 years ago

Yep, if I just download one of the latest jar files and run it with your output it generates the graph according to what you have. This is great!

kanje commented 2 years ago

Good. Then I merge this PR and close the issue. Please let me know if you have any other issues!