[Acceleo] How to grab Comments from a class [message #857548] |
Thu, 26 April 2012 12:41  |
Eclipse User |
|
|
|
Hi all,
Sometimes it works, sometime its not!
For instance, it works on some Operation, but not on the other Classes.
I use the following snippet to access comments linked to my current class:
---
// Comments attached to the class
[c.ownedComment._body/]
---
Any advise on how to troubleshoot this behavior ?
Regards.
|
|
|
Re: [Acceleo] How to grab Comments from a class [message #857815 is a reply to message #857548] |
Thu, 26 April 2012 18:04  |
Eclipse User |
|
|
|
I am using Papyrus.
Even though the diagram shows a link between a Class
and a Comment, it is not always registered in the
UML Model as is.
To correct (fix) the problem, select the Class (in this case)
Go to Properties > Advanced > Owned Comment,
edit the value and add the "Owned Comment" in the current list.
In fact, in the UML meta model, a comment is created and owned
by one Element:Class, but can be referred by other Elements (like Class).
This fix the internal model.
Following this fix, the M2T Acceleo react correctly as expected.
Regards.
|
|
|
Powered by
FUDForum. Page generated in 0.43800 seconds