Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] How to grab Comments from a class
[Acceleo] How to grab Comments from a class [message #857548] Thu, 26 April 2012 12:41 Go to next message
Alain Lavoie is currently offline Alain Lavoie
Messages: 82
Registered: April 2012
Member
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 Go to previous message
Alain Lavoie is currently offline Alain Lavoie
Messages: 82
Registered: April 2012
Member
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.
Previous Topic:Newbie question: Simple Generator creation question
Next Topic:In M2T, How to order logically my activity nodes, actions, ...
Goto Forum:
  


Current Time: Wed Aug 27 13:20:19 EDT 2014

Powered by FUDForum. Page generated in 0.02975 seconds