Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Import UML Profile to use in templates([Acceleo] Import UML Profile to use in templates)
[Acceleo] Import UML Profile to use in templates [message #542818] Sat, 26 June 2010 12:12 Go to next message
Bak Attila is currently offline Bak Attila
Messages: 29
Registered: December 2009
Junior Member
Hi,

How can i import uml profiles for use in templates?
For example i have Persistence.profile.uml.
Do i need to register it somewhere?
What are the steps i need to do?

Thanks
attila

Re: [Acceleo] Import UML Profile to use in templates [message #543743 is a reply to message #542818] Wed, 30 June 2010 12:54 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1625
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040006060209090606030500
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Attila,

You cannot use profiles directly in Acceleo templates, you can however
use profiled UML models and access profile information through the usual
UML APIs.

For example if you have a class stereotyped "Entity" and you wish to
retrieve the value of its property ""; you can use :

[template public generateSomething(class : Class) ? (not
class.getAppliedStereotype(fqn::Entity).oclIsUndefined)]
class [class.name/] has stereotype fqn::Entity.
Its table_name tagged value is
[class.getValue(class.getAppliedStereotype(fqn::Entity), 'table_name')/]
[/template]

Does this suit your need? Otherwise please elaborate on what you need to do.

Laurent Goubet
Obeo

Bak Attila wrote:
> Hi,
>
> How can i import uml profiles for use in templates?
> For example i have Persistence.profile.uml.
> Do i need to register it somewhere?
> What are the steps i need to do?
>
> Thanks
> attila
>
>


--------------040006060209090606030500
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------040006060209090606030500--
Re: [Acceleo] Import UML Profile to use in templates [message #543762 is a reply to message #543743] Wed, 30 June 2010 13:55 Go to previous message
Bak Attila is currently offline Bak Attila
Messages: 29
Registered: December 2009
Junior Member
Hi,

This is exactly the info i was looking for!
Many thanks for your answer i will try it out!

regards,
attila
Previous Topic:[acceleo] Can we know the Generated List file of mainFile
Next Topic:[Xtend] Autocomplete / code completion problems
Goto Forum:
  


Current Time: Wed Sep 03 00:05:07 GMT 2014

Powered by FUDForum. Page generated in 0.10108 seconds