Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How can i change Imported Meta-model
How can i change Imported Meta-model [message #1063899] Fri, 14 June 2013 16:36 Go to next message
serhat gezgin is currently offline serhat gezgin
Messages: 236
Registered: January 2013
Location: Izmir
Senior Member
Hi,

when i use XXEcorePostProcessor i can manipulate my generated metamodel but on my

grammer i use imported metamodel too and i want to change this metamodel too

so how can i done this ?

Sample;

I have User class on a.ecore

and i have Principle Class on b.ecore

and i have Group Class on b.ecore

and i need to do grammer as;

Principle returns Principle:
	Group | a::User

Group:
	'Group'
	name=QualifiedName
	'{'
		('users' '(' users+=[a::User|QualifiedName] ( "," users+=[a::User|QualifiedName])* ')' )?
	'}'
;


but xtext give me error on Principle rule, so i want to change a.ecore and i must User superClass to Principle class. But i cant because 2 ecores on seperated Project and when i give dependiencies to eachother i get cycled dependiency error. (i already have one dependency)

So how can i fix this ? Anyone can help me ?

Regards

[Updated on: Fri, 14 June 2013 16:38]

Report message to a moderator

Re: How can i change Imported Meta-model [message #1063902 is a reply to message #1063899] Fri, 14 June 2013 17:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6145
Registered: July 2009
Senior Member
Hi,

this is not possible.
Re: How can i change Imported Meta-model [message #1063904 is a reply to message #1063902] Fri, 14 June 2013 17:36 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6145
Registered: July 2009
Senior Member
p.s: why dont you introduce you a wrapper aka

Principle returns Principle:
Group | UserWrapper;

UserWrapper: user=User

User returns a::User:
....
Previous Topic:Configuring Scope Provider Error Handler
Next Topic:How to set cursor position in XtextEditor
Goto Forum:
  


Current Time: Sat Aug 02 02:40:07 EDT 2014

Powered by FUDForum. Page generated in 1.37070 seconds