Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Customize code generation.
Customize code generation. [message #467994] Mon, 03 August 2009 14:43 Go to next message
Eugene Ostroukhov is currently offline Eugene OstroukhovFriend
Messages: 66
Registered: July 2009
Member
Is there some tutorial on codegeneration customization? I.e. I have genmodel and when I click it I get all those editors/tests/commands/etc. How can I change the editor template?
I saw some generator plugin that generates validation adapter. But it looks like it only extends (i.e. adds) artifact generation while I want to customize persistence, editor code.
Re: Customize code generation. [message #468008 is a reply to message #467994] Mon, 03 August 2009 15:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020409000907050504010704
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Eugene,

If you want to customize what's already generated you can use dynamic
templates:

http://wiki.eclipse.org/index.php/EMF/FAQ#What_are_Dynamic_T emplates.3F

If you want to generate other/additional artifacts, the generator
example is good to look at.

Unless you generated many editors, it's not so clear you'd not be better
off simply specializing the generated editor. In terms of persistence,
it's probably generally better to focus persistence on using reflection
so that no model-specific things need to be generated...


Eugene Ostroukhov wrote:
> Is there some tutorial on codegeneration customization? I.e. I have
> genmodel and when I click it I get all those
> editors/tests/commands/etc. How can I change the editor template?
> I saw some generator plugin that generates validation adapter. But it
> looks like it only extends (i.e. adds) artifact generation while I
> want to customize persistence, editor code.

--------------020409000907050504010704
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Eugene,<br>
<br>
If you want to customize what's already generated you can use dynamic
templates:<br>
<blockquote><a
href=" http://wiki.eclipse.org/index.php/EMF/FAQ#What_are_Dynamic_T emplates.3F"> http://wiki.eclipse.org/index.php/EMF/FAQ#What_are_Dynamic_T emplates.3F</a><br>
</blockquote>
If you want to generate other/additional artifacts, the generator
example is good to look at.<br>
<br>
Unless you generated many editors, it's not so clear you'd not be
better off simply specializing the generated editor.  In terms of
persistence, it's probably generally better to focus persistence on
using reflection so that no model-specific things need to be
generated...<br>
<br>
<br>
Eugene Ostroukhov wrote:
<blockquote cite="mid:h56t3d$f8m$1@build.eclipse.org" type="cite">Is
there some tutorial on codegeneration customization? I.e. I have
genmodel and when I click it I get all those
editors/tests/commands/etc. How can I change the editor template?
<br>
I saw some generator plugin that generates validation adapter. But it
looks like it only extends (i.e. adds) artifact generation while I want
to customize persistence, editor code.
<br>
</blockquote>
</body>
</html>

--------------020409000907050504010704--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Customize code generation. [message #468014 is a reply to message #468008] Mon, 03 August 2009 15:30 Go to previous message
Eugene Ostroukhov is currently offline Eugene OstroukhovFriend
Messages: 66
Registered: July 2009
Member
Ed, thanks for the reply. I'll try the approach illustrated on the link.

Yes, I need to customize the editor generation - I'm trying to create a codegenerator that can generate some specific editors from the model - I need lots of those Smile
Previous Topic:Multivalued feature names
Next Topic:[Teneo] Undo / Redo resource save issue
Goto Forum:
  


Current Time: Thu Apr 25 10:15:12 GMT 2024

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

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

Back to the top