Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » Rule with Check Oaw
Rule with Check Oaw [message #524852] Fri, 02 April 2010 19:42 Go to next message
Eclipse UserFriend
Hi,
i want to perform a rule witch check to access to the properties heritate(Golf,Ford) from the class Stock, i tried but i could just have access to the properties of the class Car

I hope that this schema could helps
Stock <>---------------------------Car
                                                      ^
                                    ------------- |------------
                                    |                                  |
                                    |                                  |
                                Golf                             Ford
]


thanks
mahmoud
Re: Rule with Check Oaw (correction) [message #524853 is a reply to message #524852] Fri, 02 April 2010 19:46 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
i want to perform a rule witch check to access to the properties heritate(Golf,Ford) from the class Stock, i tried but i could just have access to the properties of the class Car

I hope that this schema could helps

+cars
Stock <>---------------------------Car
^
------------- |------------
| |
| |
Golf Ford

thanks
mahmoud

[Updated on: Fri, 02 April 2010 19:48] by Moderator

Re: Rule with Check Oaw (correction) [message #524871 is a reply to message #524853] Sat, 03 April 2010 04:15 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

which metamodel are you working with? Is Car on Metamodel or Model LEVEL?

[Updated on: Sat, 03 April 2010 04:16] by Moderator

Re: Rule with Check Oaw [message #524897 is a reply to message #524852] Sat, 03 April 2010 15:05 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

My metamodel is about a compagny dealing with cars and stock , and this is just an part of it. and i want fromthe stock to see the "attributes" of Golof or Ford like an exmaple

mahmoud
Re: Rule with Check Oaw [message #524899 is a reply to message #524897] Sat, 03 April 2010 15:50 Go to previous messageGo to next message
Eclipse UserFriend
hello it is still hard for me to understand what your real problem is.

if golf and ford a metaclasses (classes of the metamodel) you can work e.g. with typechecks Golf.isInstance(car) or casts ((Golf)car)) or with typeSelect on a list cars.typeSelect(Golf). using this functions you can turn your car into a Ford or Golf and work with their attributes.

if they are just instances in the model (e.g. of uml::Class you have to search the subclasses manually depending on your metamodel. e.g. by earching all classes with car (direect or indirect) as superclass

[Updated on: Sat, 03 April 2010 15:57] by Moderator

Re: Rule with Check Oaw [message #525019 is a reply to message #524899] Mon, 05 April 2010 07:32 Go to previous message
Eclipse UserFriend
Hi, thanks

Perfect, 100% working, with typeselect( ), but i dont know why the the isInstance( ) isnt working .

mahmoud
Previous Topic:Check oaw
Next Topic:[Acceleo] Set type as parameter
Goto Forum:
  


Current Time: Fri Jul 18 13:58:36 EDT 2025

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

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

Back to the top