Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » xPand and TaggedValues
xPand and TaggedValues [message #655940] Wed, 23 February 2011 07:57 Go to next message
Sir Wayne is currently offline Sir Wayne
Messages: 206
Registered: July 2009
Senior Member
Hi together,

how can i read the tagged values in my templates.
My Uml looks like:

<MYDSL:BaseEntity xmi:id="_S-3Lnj9KEeCVJNzgZt5D1g" base_Class="{D4FC60F1-9EC4-4fca-8A5F-67DD4D6A3360}"/>

<MYDSL:BaseEntity xmi:id="_S-3Lnz9KEeCVJNzgZt5D1g" persistence="&quot;persistent&quot;" base_Class="{334D0B1E-F34D-4e13-B89D-4EE8C0A5C658}"/>

i have 1 entity with no tagged values and 1 entity with a tagged value persistence.

Now i tried to print the Attribute, but nothing happened.
«FOREACH this.getAllAttributes().typeSelect(MYDSL::BaseEntity) AS attr»
//«attr.name»
//«attr.persistence»
«ENDFOREACH»

[Updated on: Wed, 23 February 2011 07:58]

Report message to a moderator

Re: xPand and TaggedValues [message #656331 is a reply to message #655940] Fri, 25 February 2011 02:28 Go to previous messageGo to next message
Sir Wayne is currently offline Sir Wayne
Messages: 206
Registered: July 2009
Senior Member
Has nobody an idea?
Re: xPand and TaggedValues [message #656349 is a reply to message #656331] Fri, 25 February 2011 03:56 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6131
Registered: July 2009
Senior Member
Hello,

as i posted before

org.eclipse.uml2.uml.Element.getAppliedStereotype(String)
org.eclipse.uml2.uml.Element.getValue(Stereotype, String)


similar ops shall be available from expand too.

alternativelay you should get direct access to

«DEFINE main FOR test::Bean»
«FILE getFQPN().replaceAll("\\.","/")+"/"+name+".java"»
//«this.tablename»


~Christian

[Updated on: Fri, 25 February 2011 05:01]

Report message to a moderator

Re: xPand and TaggedValues [message #656409 is a reply to message #656349] Fri, 25 February 2011 08:27 Go to previous message
Sir Wayne is currently offline Sir Wayne
Messages: 206
Registered: July 2009
Senior Member
Thanks a lot i can call the value direct... thats perfect and easy =)
Previous Topic:[Acceleo] Papyrus UML Profiles
Next Topic:[Acceleo 3] Protected Area
Goto Forum:
  


Current Time: Sat Jul 26 01:25:46 EDT 2014

Powered by FUDForum. Page generated in 0.02234 seconds