Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » how to check the type of a property if it is String
how to check the type of a property if it is String [message #537534] Wed, 02 June 2010 15:19
Eclipse UserFriend
hi all

can some one tells how to check the type of a property in order to return it back in a helper

is this one allowed

helper context UML!Class def: getRangeType() : UML!PrimitiveType =
if self.ownedAttribute ->select(p | p.hasStereotype('range'))->asSequence() ->first().type = 'String'
then
thisModule.stringType

while thismodule.stringtype is a primitive type i created in the transformation rule, but what if I want to refer to the uml metamodel string

like this
if self.ownedAttribute ->select(p | p.hasStereotype('range'))->asSequence() ->first().type = 'String'
then
UML!PrimitiveType.String -----or some thing like this, because I do not want to create in my system,


Previous Topic:[ATL] I can't find the button "Inject KM3 to Ecore metamodel"
Next Topic:[ATL] How to get the elements and put them in a target element
Goto Forum:
  


Current Time: Fri Jun 20 04:03:39 EDT 2025

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

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

Back to the top