Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How do Xtext dev manage to have custom impl for emf classes?
How do Xtext dev manage to have custom impl for emf classes? [message #1015833] Sun, 03 March 2013 13:11 Go to next message
Victor Noël is currently offline Victor NoëlFriend
Messages: 112
Registered: June 2010
Senior Member
Hi,

I noticed some of the implementation for the JavaVMTypes emf classes are custom ones.

What's the trick for having such a custom impl that is used everywhere (in particular if I have generated classes by another grammar extending some fo the JavaVMTypes emf classes)?

Thanks for any tips :)
Re: How do Xtext dev manage to have custom impl for emf classes? [message #1015836 is a reply to message #1015833] Sun, 03 March 2013 14:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi Xtext comes with a workflow component called ecoregenerator that
enables the generation gap pattern for ecore.

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How do Xtext dev manage to have custom impl for emf classes? [message #1015845 is a reply to message #1015836] Sun, 03 March 2013 17:47 Go to previous messageGo to next message
Victor Noël is currently offline Victor NoëlFriend
Messages: 112
Registered: June 2010
Senior Member
Hi, ok but I coudln't see it used for commons.types!

I saw that xbase was using it while refering to commons.types src folder, but that's all.
Re: How do Xtext dev manage to have custom impl for emf classes? [message #1015847 is a reply to message #1015845] Sun, 03 March 2013 18:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/tree/plugins/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/GenerateEMF.java

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How do Xtext dev manage to have custom impl for emf classes? [message #1015849 is a reply to message #1015847] Sun, 03 March 2013 18:26 Go to previous messageGo to next message
Victor Noël is currently offline Victor NoëlFriend
Messages: 112
Registered: June 2010
Senior Member
Great, thanks Smile
Re: How do Xtext dev manage to have custom impl for emf classes? [message #1015850 is a reply to message #1015849] Sun, 03 March 2013 18:33 Go to previous messageGo to next message
Victor Noël is currently offline Victor NoëlFriend
Messages: 112
Registered: June 2010
Senior Member
It works, and if I want my language, which relies on the EMF meta-model previously generated using this component, to also exploits the custom implementation (in a case of a grammar rule that returns a class with a custom impl), can I do it without having to manage the ecore model by hand instead of generating it with xtext?

Because with the default EcoreGeneratorFragment, the custom impl are not taken into account...
Re: How do Xtext dev manage to have custom impl for emf classes? [message #1015851 is a reply to message #1015850] Sun, 03 March 2013 18:38 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
hmmmm, i dont know if this is intended

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How do Xtext dev manage to have custom impl for emf classes? [message #1015981 is a reply to message #1015851] Mon, 04 March 2013 13:29 Go to previous messageGo to next message
Victor Noël is currently offline Victor NoëlFriend
Messages: 112
Registered: June 2010
Senior Member
So, do you think I should report this as a bug maybe?
Re: How do Xtext dev manage to have custom impl for emf classes? [message #1015989 is a reply to message #1015981] Mon, 04 March 2013 14:06 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Feel free to do so

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Eclipse 4.2.1 stuck for long time on "writing new resource descriptions"
Next Topic:Serialization assert in Xtext tester fails with unclear message
Goto Forum:
  


Current Time: Thu Mar 28 21:54:47 GMT 2024

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

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

Back to the top