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 20:36 Go to next message
serhat gezgin is currently offline serhat gezginFriend
Messages: 242
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 20: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 21:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6546
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 21:36 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6546
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: Fri Dec 19 10:57:18 GMT 2014

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

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