Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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] by Moderator

Re: [MTL] Reading Opaque Expressions [message #639192 is a reply to message #639171] Mon, 15 November 2010 10:17 Go to previous messageGo to next message
Eclipse UserFriend
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 11:07 Go to previous messageGo to next message
Eclipse UserFriend
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 08:45 Go to previous message
Eclipse UserFriend
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: Fri May 09 00:01:27 EDT 2025

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

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

Back to the top