eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[pivot] CS omits comments #2311

Open eclipse-ocl-bot opened 2 months ago

eclipse-ocl-bot commented 2 months ago

| --- | --- | | Bugzilla Link | 582648 | | Status | NEW | | Importance | P3 normal | | Reported | Nov 18, 2023 01:01 EDT | | Modified | Nov 18, 2023 01:22 EDT | | Reporter | Ed Willink |

Description

Saving the CS of an OCL/QVTd pivot model saves without the comments since they are variously rescued from AS or Node model.

Now that the DeclarativeSerializer is in use the requirement that everything be serizable oif the old serializer is removed. There could be a CommentCS and we could then comment the Model/Root/TopLevelCS rather than the first ImportCS.

Textually, the very first comment is a Model/Root/TopLevel comment. Any further comments are for the first child.

Any element vene expression operators can contain CommentCS. A CommentCS.style can distinguish single line/multi-line/framed/... textual styles. Perhaps a CommentCS.position can distinguish pre/post-comment.

eclipse-ocl-bot commented 2 months ago

By Ed Willink on Nov 18, 2023 01:22

(In reply to Ed Willink from comment #0)

we could then comment the Model/Root/TopLevelCS rather than the first ImportCS.

This is a language design bug.

Sensible languages such as Java or QVTo can have a root keyword such as package or module; imports appear 'within' rather than before the root. Even Java is poor for default package. For much of OCL/QVTd we are free to be clearer on the root.