|
Re: Customize code generation. [message #468008 is a reply to message #467994] |
Mon, 03 August 2009 15:16 |
Ed Merks 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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02507 seconds