|
Re: [Acceleo] Cannot access a class's package attribute [message #494438 is a reply to message #494425] |
Fri, 30 October 2009 15:49 |
|
This is a multi-part message in MIME format.
--------------010309060109070802070008
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Hi Peter,
That's a collision between OCL keywords and UML choice of feature names.
To access UML's "package" attribute, you need to use "_package" in OCL.
The same will be true for most collisions such as this one.
Laurent Goubet
Obeo
Peter Keller a écrit :
> Dear all,
>
> Can anyone explain what is wrong with this template?
>
> [module syntaxerr('http://www.eclipse.org/uml2/2.1.0/UML')/]
>
> [template public syntaxerr(c : Class)]
>
> [comment @main /]
> [c.package/]
>
> [/template]
>
>
> I get a syntax error in the MTL editor, and the message:
>
> Quote:
>> token 'package' is invalid
>
>
> I paused after typing 'c.' and selected 'package' from the drop-down
> list. If I use 'namespace' instead of 'package', it works fine.
>
> I am using the Galileo modeling SR1 release (Linux x86_64) with Acceleo
> 2.6.0 installed from the Acceleo update site.
>
> Thanks for any help,
> Peter.
>
> P.S. In case anyone is wondering what use a template like this is, I
> would really like to use [c.package.name/] , but need to get past this
> error first.
--------------010309060109070802070008
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
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyLyI+T2JlbzwvYT4NCmVtYWls O2ludGVybmV0
OmxhdXJlbnQuZ291YmV0QG9iZW8uZnINCnVybDpodHRwOi8vd3d3Lm9iZW8u ZnINCnZlcnNp
b246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------010309060109070802070008--
|
|
|
|
Powered by
FUDForum. Page generated in 0.03840 seconds