Skip to main content


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 16:41 Go to next message
Alain Lavoie is currently offline Alain LavoieFriend
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 22:04 Go to previous message
Alain Lavoie is currently offline Alain LavoieFriend
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: Tue Apr 16 17:31:19 GMT 2024

Powered by FUDForum. Page generated in 1.66823 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top