Problem with hyphens in attributes [message #666181] |
Tue, 19 April 2011 08:25  |
Eclipse User |
|
|
|
Hi all,
In an ECORE model, I can declare an attribute with a name including the hyphen, for example: name-of-attribute: EString . However, it turns out that we cannot indicate that attribute in an ATL rule. More precisely, the statement: name-of-attribute<- a.name will raise an error. Except changing the attribute's name, do you guys have any other solution? Thanks in advance!
|
|
|
|
|
Re: Problem with hyphens in attributes [message #666270 is a reply to message #666242] |
Tue, 19 April 2011 12:30  |
Eclipse User |
|
|
|
On 19/04/2011 15:44, Sylvain EVEILLARD wrote:
> I believe this breaks the parsing of the ATL file so you don't have
> much choice. You can use an imperative block tho :
>
> do{
> t.refSetValue('name-of-attribute',a.name);
> }
ATL might want to adopt the OCL 2.3 syntax of underescore prefixed
string for awkward identifiers.
_'name-of-attribute'
Regards
Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.04585 seconds