|
|
|
|
Re: Read the value of properties of stereotype in Acceleo [message #1808608 is a reply to message #1808575] |
Thu, 27 June 2019 17:50 |
Mohammad Inayatullah Messages: 21 Registered: May 2019 |
Junior Member |
|
|
Thanks Ed Willink you alway help me very well. Your given link help me.
i used the following code and it resolved my problem very well
[ '[' /]Column(TypeName = "[p.getTaggedValue(p, p.getApplicableStereotype('PropertiesProfile::dbtypes').qualifiedName, 'datatype')/]([p.getTaggedValue(p, p.getApplicableStereotype('PropertiesProfile::dbtypes').qualifiedName, 'length')/])")[ ']' /]
[query public getTaggedValue(stereotypedElement : Element, stereotypeName : String, propertyName : String) : OclAny =
let stereotype : Stereotype = stereotypedElement.getAppliedStereotype(stereotypeName) in
if not stereotype.oclIsUndefined() then
if propertyName ='datatype' then
stereotypedElement.getValue(stereotype, propertyName).oclAsType(EnumerationLiteral).name
else
stereotypedElement.getValue(stereotype, propertyName)
endif
else
null
endif/]
Thanks again for your help
[Updated on: Thu, 27 June 2019 17:51] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04866 seconds