Access to description attribute of a Property template construct parameter

Hi all,
I want to use a parameterized template construct to access the attributes of a Property object to generate some output in a word document. When I use the template with some basic types (e.g. Integer or String) it works fine but when I’ve tried to use a Property object, I can only access the “name” attribute but not e.g. the “description” attribute. Using the unit test recursiveEObject-template as a starting point, my template looks like this:
{ m:template mytest(element : ecore::ENamedElement) }
{ m: element.description }
{ m:endtemplate }
And I get the following error message:
{ m:element. <—Feature description not found in EClass ENamedElement description }
I assume that the type of my parameter is just wrong and I need to change it or cast it to some derived Property child class of ENamedElement but I did not find the correct class. Any suggestions?
Kind regards
Christian

My response:
https://stackoverflow.com/q/58992034
If you need more details feel free to ask here.

Works great - thanks for the help. (And sorry for the double post - I was not sure which forum to use).

Ok, now I wanted to access name, description and type of my template construct parameter which has been a Property object.
Looking for the CapellaElement interface in the capella sources, I found a directory with the accessible types (at least I think that these interfaces can be used as a parameter type). The interface TypedElement seems to do the job I was looking for.
Finally my solution looks like this (and it seems to work
):
{ m:template mytest(element : capellacore::TypedElement) }
{ m: element.name }
{ m: element.description }
{ m: element.type.description }
{ m:endtemplate }
Uff, this was hard to find out
.

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.