Hello everybody,
I need to allow the call of functions or properties on EObjects references depending of the type of the EObject. So far, I've done this kind of things through scoping. Now, the problem is that those functions and properties I have to call are not defined by the user.
I thought I should do something like create the new EObjects I need in my scoping implementation and return them.
Fox example:
Model:
(connection+=Connection)+
(attribute+=Attribute)+
assignment=Assignment
;
Connection:
'con: ' name=ID
;
Attribute:
'att: ' name= ID
;
Assignment:
object=[ecore::EObject]'.'call=[ecore::EObject]
;
I want to write something like:
con: MyConnection
att: MyAttribute
MyConnection.username
MyAttribute.toString()
, where "username" only applies to Connection objects and "toString()" to Attributes.
Where I should write or create those methods and properties?
Thank you very much!