[Acceleo] how to get the type of UML attribute/property ? [message #1266365] |
Fri, 07 March 2014 10:45 |
Joost Kraaijeveld Messages: 273 Registered: July 2009 |
Senior Member |
|
|
Hi,
I posted a similar/the same question yesterday but I got no response, so
I rephrase the question and hope for an answer.
I have a Papyrus model in which a class "Object" that has several
attributes with the type "String" from the UML Primitive Types, which I
imported using "import Registered Package"->"UMLPrimitiveTypes". Based
on the getting started tutorial I expected the following to work and to
result in "String attributeName":
[for (p: Property | aClass.attribute)]
[p.type.name/] [p.name/];
[/for]
But "[p.type.name/]" does not result in any output. Calling
[p.type.name.trim()/] results in an execption, i.e.
java.lang.UnsupportedOperationException: Operation trim() is undefined
on type null.
Doing the same (with and without the trim()) in the Acceleo debugger
results in "String" as expected.
Am I missing something? What should I do?
I attached my Eclipse project with all sources.
TIA
Joost
Cheers,
Joost
|
|
|
|
Powered by
FUDForum. Page generated in 0.03148 seconds