Skip to main content


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: 48
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: 1902
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: 48
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 messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
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
Re: [MTL] Reading Opaque Expressions [message #1781999 is a reply to message #639171] Thu, 15 February 2018 16:07 Go to previous messageGo to next message
Alberto Santos is currently offline Alberto SantosFriend
Messages: 1
Registered: February 2018
Junior Member
I had been thinking that Acceleo does not transform Activity Diagrams to Code. can you please showme how do you do?
Re: [MTL] Reading Opaque Expressions [message #1782437 is a reply to message #1781999] Fri, 23 February 2018 13:45 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hello,

Please create your own thread for question instead of necro-ing unrelated old threads. As for your question, you can use whatever input for Acceleo generation as long as they're EMF models, such as activity diagrams that can be read as an UML diagram and passed on to an acceleo generator.

Laurent Goubet
Obeo
Previous Topic:[Acceleo] Filename based on result of EOperation
Next Topic:[Acceleo] Bad behaviour with Java classes with Acceleo runner
Goto Forum:
  


Current Time: Thu Apr 25 21:33:58 GMT 2024

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

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

Back to the top