|
Re: [Acceleo] Import UML Profile to use in templates [message #543743 is a reply to message #542818] |
Wed, 30 June 2010 12:54 |
|
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--
|
|
|
|
Powered by
FUDForum. Page generated in 0.08012 seconds