Menu

#253 Model-links comments in generated code sometimes don't work

QM
closed
None
1
2021-06-17
2019-12-06
No

The model-link comments don't work correctly when the names of sibling items repeat at any level of nesting. Specifically, when such links are copied from the generated code to the clipboard, the QM modeling tool does not recognize the link and does not enable the "paste-link" option.
--MMS

Discussion

  • Quantum Leaps

    Quantum Leaps - 2019-12-14

    The problem arises in submachines, where the names of Entry Point Segments and eXit Points can be the same as the names of substates nested in the submachine.

    NOTE: The repeating names of substates and other elements typically results in generated code that does not compile (because of the name clashes). However, the Entry Point Segments can have the same names as substates and the resulting code will compile.

    The chosen solution is to make the model-links for Entry Point Segments unique by prepending "EP-" in the link name. Similarly, the model-links to eXit Points will have "XP-" prepeneded to the model link. Here are some examples of the model-link comments for Entry Point Segmens and eXit Point Segments:

    /*.${SMs::Calc::SM::operand::EP-intgr} */
    //.${SMs::Calc::SM::operand::XP-CE}
    

    --MMS

     
    • Anonymous

      Anonymous - 2021-06-17
      Post awaiting moderation.
  • Quantum Leaps

    Quantum Leaps - 2020-05-07

    Fixed in QM 4.6.0.
    --MMS

     

Anonymous
Anonymous

Add attachments
Cancel