Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Return different properties depending of the EObject type(Scoping)
Return different properties depending of the EObject type [message #674838] Sat, 28 May 2011 20:44
Rafael Angarita is currently offline Rafael AngaritaFriend
Messages: 94
Registered: November 2010
Member
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!

Previous Topic:Run MWE2 workflow from java project
Next Topic:Creating an unvalidated area of text
Goto Forum:
  


Current Time: Fri Apr 26 12:35:26 GMT 2024

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

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

Back to the top