Fix GMX Timeline Actions

Reporter: RobertBColton  |  Status: closed  |  Last Modified: August 01, 2020, 09:36:58 PM

Yeah I tested it, of course I tested it. Timelines in GMX have a slightly different structure for moments than objects do for events. This means we need to support XML paths for the action nodes, which I've now added. First, I moved the string_endswith utility out of the compiler source and into the shared string utility header. I then have the GMX reader use that to check if the end of the GMX path name is "action" and in that case to handle the actions. It now looks for the first action child using the full path as well.

Also fyi, there's probably more tweaking to be done yet to the actions to code conversion because opening up a timeline in RGM right now looks like the following. The original version from the LGM plugin I believe does this in the codegen as well, but ideally the user won't want the extra braces so we should look into that later.
RGM Timeline Moments Code

<timeline>
  <entry>
    <step>0</step>
    <event>
      <action>
        ...
      </action>
      <action>
        ...
      </action>
    </event>
  </entry>
  <entry>
    <step>1</step>
    <event>
      <action>
        ...
      </action>
    </event>
  </entry>
</timeline>

<object>
  <events>
    <event enumb="0" eventtype="8">
      <action>
        ...
      </action>
    </event>
    <event enumb="0" eventtype="2">
      <action>
        ...
      </action>
    </event>
  </events>
</object>
codecov[bot]  
>Codecov Report

Merging #2093 into master will decrease coverage by 0.00%.
The diff coverage is 8.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2093      +/-   ##
==========================================
- Coverage   30.95%   30.95%   -0.01%     
==========================================
  Files         197      197              
  Lines       19115    19102      -13     
==========================================
- Hits         5918     5913       -5     
+ Misses      13197    13189       -8     
Impacted Files Coverage Δ
ENIGMAsystem/SHELL/Platforms/General/PFwindow.cpp 40.42% <0.00%> (-0.88%) ⬇️
ENIGMAsystem/SHELL/Platforms/SDL/Event.cpp 18.49% <0.00%> (ø)
ENIGMAsystem/SHELL/Platforms/SDL/Window.cpp 59.52% <0.00%> (+0.70%) ⬆️
...GMAsystem/SHELL/Platforms/xlib/XDisplayGetters.cpp 92.59% <ø> (ø)
ENIGMAsystem/SHELL/Platforms/xlib/XLIBmain.cpp 35.00% <ø> (-2.04%) ⬇️
ENIGMAsystem/SHELL/Platforms/xlib/XLIBwindow.cpp 52.34% <ø> (+0.68%) ⬆️
...GMAsystem/SHELL/Universal_System/image_formats.cpp 41.51% <0.00%> (ø)
...NIGMAsystem/SHELL/Universal_System/terminal_io.cpp 5.88% <ø> (+0.32%) ⬆️
...MAsystem/SHELL/Widget_Systems/None/default_log.cpp 46.15% <100.00%> (+4.48%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5881bfb...04f840d. Read the comment docs.

Please sign in to post comments, or you can view this issue on GitHub.