Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [org.eclipse.emf.codegen.ecore] Model code generation templates in Xtend?
[org.eclipse.emf.codegen.ecore] Model code generation templates in Xtend? [message #1235530] Fri, 24 January 2014 10:45 Go to next message
Eclipse UserFriend
Hi,

I was looking at the source code of EMF looking for templates used for code generation from a GenModel and I ended up looking inside the "org.eclipse.emf.codegen.ecore" plugin source code.

There, I found Java and JET templates (I assume the former is generated from the latter) and I was wondering:

  • Am I looking at the right templates? i.e. are these templates the ones used when generating code using "Right click->Generated Model code"?
  • If so, is there by any chance an Xtend version of these templates available somewhere ?


What I'm looking for is to generate the same code as Eclipse would do but by using Xtend.

Thanks,
BQ.
Re: [org.eclipse.emf.codegen.ecore] Model code generation templates in Xtend? [message #1235543 is a reply to message #1235530] Fri, 24 January 2014 11:15 Go to previous messageGo to next message
Eclipse UserFriend
On 24-01-14 16:45, Bertrand Quenin wrote:
> Hi,
>
> I was looking at the source code of EMF looking for templates used for
> code generation from a GenModel and I ended up looking inside the
> "org.eclipse.emf.codegen.ecore" plugin source code.
>
> There, I found Java and JET templates (I assume the former is generated
> from the latter) and I was wondering:
>
> Am I looking at the right templates? i.e. are these templates the ones
> used when generating code using "Right click->Generated Model code"?
> If so, is there by any chance an Xtend version of these templates
> available somewhere ?
No, I don't think the EMF code generation ever moved beyond Xtend.
I made an attempt to move EMF to e4 generation, which at some point
would start to use Xtend, but that is really only the UI side of EMF.
see here: https://github.com/dzonekl/e4mf

What is it you are looking for to change in the templates?

>
> What I'm looking for is to generate the same code as Eclipse would do
> but by using Xtend.
>
> Thanks,
> BQ.
>
Re: [org.eclipse.emf.codegen.ecore] Model code generation templates in Xtend? [message #1235544 is a reply to message #1235543] Fri, 24 January 2014 11:16 Go to previous messageGo to next message
Eclipse UserFriend
On 24-01-14 17:15, Christophe Bouhier wrote:
> On 24-01-14 16:45, Bertrand Quenin wrote:
>> Hi,
>>
>> I was looking at the source code of EMF looking for templates used for
>> code generation from a GenModel and I ended up looking inside the
>> "org.eclipse.emf.codegen.ecore" plugin source code.
>>
>> There, I found Java and JET templates (I assume the former is generated
>> from the latter) and I was wondering:
>>
>> Am I looking at the right templates? i.e. are these templates the ones
>> used when generating code using "Right click->Generated Model code"?
>> If so, is there by any chance an Xtend version of these templates
>> available somewhere ?
> No, I don't think the EMF code generation ever moved beyond Xtend.

moved beyond JET that is....

> I made an attempt to move EMF to e4 generation, which at some point
> would start to use Xtend, but that is really only the UI side of EMF.
> see here: https://github.com/dzonekl/e4mf
>
> What is it you are looking for to change in the templates?
>
>>
>> What I'm looking for is to generate the same code as Eclipse would do
>> but by using Xtend.
>>
>> Thanks,
>> BQ.
>>
>
Re: [org.eclipse.emf.codegen.ecore] Model code generation templates in Xtend? [message #1235563 is a reply to message #1235543] Fri, 24 January 2014 12:16 Go to previous message
Eclipse UserFriend
Thanks for the info, I'm definitely gonna have a look at e4mf.

Why I'm looking for this? Because I want to have total control on how the code is generated.

Regards,
BQ.
Previous Topic:EMF Facet - adding additional Attributes
Next Topic:[EEF] How to Generate Multiple Tabs
Goto Forum:
  


Current Time: Fri Jul 25 01:27:14 EDT 2025

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

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

Back to the top