QVT 1.4 RTF Avatar
  1. OMG Issue

QVT14 — How are comments persisted?

  • Key: QVT14-68
  • Status: open  
  • Source: Model Driven Solutions ( Dr. Edward Willink)
  • Summary:

    QVT supports two styles of comment, single/multi-line each of which may precede/follow the commented syntax element. (A leading new-line distinguishes a preceding from a following comment).

    The QVT AS inherits a Comment element from MOF with body and annotatedElement properties. This is inadequate to distinguish the two styles or the two positions. Could be fixed by a couple of Boolean properties.

    Comments may also be applied to punctuation that has no corresponding model element.

    if x then y
    else // must have an else
    z endif

    Perhaps an annotatedText is necessary to allow a comment to refer to punctuation

    <comment multiline="false" prefix="false" annotatedText="else" body="must have an else"/>

    Might need an annotatedIndex too for the case where the annotatedText occurs multiple times.

    Since the annotatedElement is already there, it might be less klunky to anchor the markup with annotatedElement="...z..." precedingText="else", where "...z..." is the appropriate fragment to reference the z element.

  • Reported: QVT 1.3 — Fri, 9 Oct 2020 09:53 GMT
  • Updated: Fri, 9 Oct 2020 09:53 GMT