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 15:07 Go to next message
Siegfried Nolte is currently offline Siegfried NolteFriend
Messages: 40
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 12:57 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1639
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 13:51 Go to previous messageGo to next message
Siegfried Nolte is currently offline Siegfried NolteFriend
Messages: 40
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 13:52]

Report message to a moderator

Re: [MTL] Reading Opaque Expressions [message #639192 is a reply to message #639171] Mon, 15 November 2010 15:17 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1639
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: Fri Dec 19 22:55:39 GMT 2014

Powered by FUDForum. Page generated in 0.01600 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software