Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [MTL] Reading Opaque Expressions(Reading the body of an OpaqueExpression )
[MTL] Reading Opaque Expressions [message #638226] Wed, 10 November 2010 10:07 Go to next message
Siegfried Mising name is currently offline Siegfried Mising name
Messages: 39
Registered: August 2009
Member
Hi MTL folks,

if I read the body of an OpaqueExpression with MTL, I get something like "[<body>]". There are that brackets what is bothering me.

Is this specified this way? Is the value of an opaque body "[something]" even if I define it "something"?
How do I get rid of them?

Thanks for help,
Siegfried
Re: [MTL] Reading Opaque Expressions [message #639157 is a reply to message #638226] Mon, 15 November 2010 07:57 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1625
Registered: July 2009
Senior Member
Hi Siegfried,

What are you doing exactly? What do you mean by "I get something like [<...>]"?

I'd say these brackets come from the fact you are manipulating a list, but Acceleo doesn't generate them. Thus I don't know where you "get" them.

Laurent Goubet
Obeo
Re: [MTL] Reading Opaque Expressions [message #639171 is a reply to message #639157] Mon, 15 November 2010 08:51 Go to previous messageGo to next message
Siegfried Mising name is currently offline Siegfried Mising name
Messages: 39
Registered: August 2009
Member
Hi Laurent,

of course you are right. I'm dealing with lists.
I'm doing some tests with the UML action model.
[if (oa.oclIsTypeOf(OpaqueAction))][oa.name/] [oa.body/][/if]
That delivers "'somename' ['content of body']"
The following statement does better:
[oa.body->first()/]
That delivers "'somename' 'content of body'"

Thanks,
Siegfried

[Updated on: Mon, 15 November 2010 08:52]

Report message to a moderator

Re: [MTL] Reading Opaque Expressions [message #639192 is a reply to message #639171] Mon, 15 November 2010 10:17 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1625
Registered: July 2009
Senior Member
Siegfried,

Okay, then I was wrong with my assumption that "Acceleo doesn't generate them" ... I believe you are using an older version of Acceleo (IIRC, I've specialized the generation of "List" as Strings since 3.0.0).

You should no longer see those brackets with an updated Acceleo. If you do ... then something escapes me and... please raise a bug if it's the case Smile.

Laurent Goubet
Obeo
Previous Topic:[acceleo]Accessing UML elements in SysML Model
Next Topic:[Acceleo 3] Howto use a model in memory
Goto Forum:
  


Current Time: Wed Aug 27 15:10:59 EDT 2014

Powered by FUDForum. Page generated in 0.01874 seconds