Skip to main content


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 12:57 Go to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
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 12:58]

Report message to a moderator

Re: xPand and TaggedValues [message #656331 is a reply to message #655940] Fri, 25 February 2011 07:28 Go to previous messageGo to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
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 08:56 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 14665
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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

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

Report message to a moderator

Re: xPand and TaggedValues [message #656409 is a reply to message #656349] Fri, 25 February 2011 13:27 Go to previous message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
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: Thu Apr 25 16:39:48 GMT 2024

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

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

Back to the top