Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » JET: How to obtain GenClass?
JET: How to obtain GenClass? [message #77446] Thu, 29 March 2007 15:13 Go to next message
Eclipse UserFriend
Originally posted by: claude.knaus.profidatalab.com

Hi,

I would like to write JET templates to transform an ecore model into code.
Overriding the default EMF templates using "@generate NOT" is not flexible
enough for me.

Looking at the built-in templates, e.g. Class.javajet, they expect GenClass
to be passed in as argument. I would like to write my own templates which
use GenClass as the input argument.

How can I obtain the GenClass instance when calling generate(Object)?

-- Claude
Re: JET: How to obtain GenClass? [message #77512 is a reply to message #77446] Thu, 29 March 2007 15:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------050205070204000301080302
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Claude,

If you wish to change existing templates, have a look at previous
answers for how to use dynamic templates:

http://www.eclipse.org/search/search.cgi?q=dynamic+templates &cmd=Search%21&form=extended&wf=574a74&ps=10 &m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.tools. emf&wm=wrd&t=News&t=Mail
< http://www.eclipse.org/search/search.cgi?q=dynamic+templates &cmd=Search%21&form=extended&wf=574a74&ps=10 &m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.tools. emf&wm=wrd&t=News&t=Mail>

The org.eclipse.emf.examples.generator.validator shows a working example
of how to extend the generator with additional templates, so that's a
good thing to look at too.


Claude Knaus wrote:
> Hi,
>
> I would like to write JET templates to transform an ecore model into code.
> Overriding the default EMF templates using "@generate NOT" is not flexible
> enough for me.
>
> Looking at the built-in templates, e.g. Class.javajet, they expect GenClass
> to be passed in as argument. I would like to write my own templates which
> use GenClass as the input argument.
>
> How can I obtain the GenClass instance when calling generate(Object)?
>
> -- Claude
>
>
>


--------------050205070204000301080302
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Claude,<br>
<br>
If you wish to change existing templates, have a look at previous
answers for how to use dynamic templates:<br>
<blockquote><a
href=" http://www.eclipse.org/search/search.cgi?q=dynamic+templates &amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail "> http://www.eclipse.org/search/search.cgi?q=dynamic+templates &amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail </a><br>
</blockquote>
The org.eclipse.emf.examples.generator.validator shows a working
example of how to extend the generator with additional templates, so
that's a good thing to look at too. <br>
<br>
<br>
Claude Knaus wrote:
<blockquote cite="mideugl2h$454$1@build.eclipse.org" type="cite">
<pre wrap="">Hi,

I would like to write JET templates to transform an ecore model into code.
Overriding the default EMF templates using "@generate NOT" is not flexible
enough for me.

Looking at the built-in templates, e.g. Class.javajet, they expect GenClass
to be passed in as argument. I would like to write my own templates which
use GenClass as the input argument.

How can I obtain the GenClass instance when calling generate(Object)?

-- Claude


</pre>
</blockquote>
<br>
</body>
</html>

--------------050205070204000301080302--
Re: JET: How to obtain GenClass? [message #77630 is a reply to message #77512] Fri, 30 March 2007 09:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: claude.knaus.profidatalab.com

This is a multi-part message in MIME format.

------=_NextPart_000_0070_01C772C1.C7E22650
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Ed,

Thanks for the hint. I added two entries to the EMF FAQ:

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

Cheers,
-- Claude
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:eugmju$kmq$1@build.eclipse.org...
Claude,

If you wish to change existing templates, have a look at previous =
answers for how to use dynamic templates:

=
http://www.eclipse.org/search/search.cgi?q=3Ddynamic+templat es&cmd=3DSear=
ch%21&form=3Dextended&wf=3D574a74&ps=3D10&m= 3Dall&t=3D5&ul=3D%2Fnewslists=
%2Fnews.eclipse.tools.emf&wm=3Dwrd&t=3DNews&t=3D Mail

The org.eclipse.emf.examples.generator.validator shows a working =
example of how to extend the generator with additional templates, so =
that's a good thing to look at too.=20


Claude Knaus wrote:=20
Hi,

I would like to write JET templates to transform an ecore model into =
code.=20
Overriding the default EMF templates using "@generate NOT" is not =
flexible=20
enough for me.

Looking at the built-in templates, e.g. Class.javajet, they expect =
GenClass=20
to be passed in as argument. I would like to write my own templates =
which=20
use GenClass as the input argument.

How can I obtain the GenClass instance when calling generate(Object)?

-- Claude=20


=20

------=_NextPart_000_0070_01C772C1.C7E22650
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Ed,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for the hint. I added two =
entries to the EMF=20
FAQ:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D" http://wiki.eclipse.org/index.php/EMF-FAQ#What_are_Dynamic_T empla=
tes.3F"> http://wiki.eclipse.org/index.php/EMF-FAQ#What_are_Dynamic_T empla=
tes.3F</A></FONT></DIV><U><FONT=20
face=3DArial color=3D#0000ff size=3D2><A=20
href=3D" http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_use_Dynam ic_Te=
mplates.3F"> http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_use_Dynam i=
c_Templates.3F</A></FONT></U>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Cheers,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- Claude</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:eugmju$kmq$1@build.eclipse.org">news:eugmju$kmq$1@build.ecli=
pse.org</A>...</DIV>Claude,<BR><BR>If=20
you wish to change existing templates, have a look at previous answers =
for how=20
to use dynamic templates:<BR>
<BLOCKQUOTE><A=20
=
href=3D" http://www.eclipse.org/search/search.cgi?q=3Ddynamic+templat es&am=
p;cmd=3DSearch%21&amp;form=3Dextended&amp;wf=3D574a7 4&amp;ps=3D10&amp;m=3D=
all&amp;t=3D5&amp;ul=3D%2Fnewslists%2Fnews.eclipse.t ools.emf&amp;wm=3Dwrd=
&amp;t=3DNews&amp;t=3DMail">http://www.eclipse.org/search/search.cgi?q=3D=
dynamic+templates&amp;cmd=3DSearch%21&amp;form=3Dext ended&amp;wf=3D574a74=
&amp;ps=3D10&amp;m=3Dall&amp;t=3D5&amp;ul=3D %2Fnewslists%2Fnews.eclipse.t=
ools.emf&amp;wm=3Dwrd&amp;t=3DNews&amp;t=3DMail</A ><BR></BLOCKQUOTE>The=20
org.eclipse.emf.examples.generator.validator shows a working example =
of how to=20
extend the generator with additional templates, so that's a good thing =
to look=20
at too. <BR><BR><BR>Claude Knaus wrote:=20
<BLOCKQUOTE cite=3Dmideugl2h$454$1@build.eclipse.org =
type=3D"cite"><PRE wrap=3D"">Hi,

I would like to write JET templates to transform an ecore model into =
code.=20
Overriding the default EMF templates using "@generate NOT" is not =
flexible=20
enough for me.

Looking at the built-in templates, e.g. Class.javajet, they expect =
GenClass=20
to be passed in as argument. I would like to write my own templates =
which=20
use GenClass as the input argument.

How can I obtain the GenClass instance when calling generate(Object)?

-- Claude=20


</PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0070_01C772C1.C7E22650--
Re: JET: How to obtain GenClass? [message #77644 is a reply to message #77630] Fri, 30 March 2007 10:00 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------030700030401060504010100
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Claude,

Thanks for helping with the FAQ!


Claude Knaus wrote:
> Hi Ed,
>
> Thanks for the hint. I added two entries to the EMF FAQ:
>
> http://wiki.eclipse.org/index.php/EMF-FAQ#What_are_Dynamic_T emplates.3F
> _http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_use_Dyna mic_Templates.3F_
>
>
> Cheers,
> -- Claude
>
> "Ed Merks" <merks@ca.ibm.com <mailto:merks@ca.ibm.com>> wrote in
> message news:eugmju$kmq$1@build.eclipse.org...
> Claude,
>
> If you wish to change existing templates, have a look at previous
> answers for how to use dynamic templates:
>
> http://www.eclipse.org/search/search.cgi?q=dynamic+templates &cmd=Search%21&form=extended&wf=574a74&ps=10 &m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.tools. emf&wm=wrd&t=News&t=Mail
> < http://www.eclipse.org/search/search.cgi?q=dynamic+templates &cmd=Search%21&form=extended&wf=574a74&ps=10 &m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.tools. emf&wm=wrd&t=News&t=Mail>
>
> The org.eclipse.emf.examples.generator.validator shows a working
> example of how to extend the generator with additional templates,
> so that's a good thing to look at too.
>
>
> Claude Knaus wrote:
>> Hi,
>>
>> I would like to write JET templates to transform an ecore model into code.
>> Overriding the default EMF templates using "@generate NOT" is not flexible
>> enough for me.
>>
>> Looking at the built-in templates, e.g. Class.javajet, they expect GenClass
>> to be passed in as argument. I would like to write my own templates which
>> use GenClass as the input argument.
>>
>> How can I obtain the GenClass instance when calling generate(Object)?
>>
>> -- Claude
>>
>>
>>
>


--------------030700030401060504010100
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Claude,<br>
<br>
Thanks for helping with the FAQ!<br>
<br>
<br>
Claude Knaus wrote:
<blockquote cite="mideuimje$8hd$1@build.eclipse.org" type="cite">
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<meta content="MSHTML 6.00.6000.16414" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">Hi Ed,</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Thanks for the hint. I added two
entries to the EMF FAQ:</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2"><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></font></div>
<u><font color="#0000ff" face="Arial" size="2"><a
href=" http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_use_Dynam ic_Templates.3F"> http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_use_Dynam ic_Templates.3F</a></font></u>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Cheers,</font></div>
<div><font face="Arial" size="2">-- Claude</font></div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div>"Ed Merks" &lt;<a href="mailto:merks@ca.ibm.com">merks@ca.ibm.com</a>&gt;
wrote in message <a href="news:eugmju$kmq$1@build.eclipse.org">news:eugmju$kmq$1@build.eclipse.org</a>...</div>
Claude,<br>
<br>
If you wish to change existing templates, have a look at previous
answers for how to use dynamic templates:<br>
<blockquote><a
href=" http://www.eclipse.org/search/search.cgi?q=dynamic+templates &amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail "> http://www.eclipse.org/search/search.cgi?q=dynamic+templates &amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail </a><br>
</blockquote>
The org.eclipse.emf.examples.generator.validator shows a working
example of how to extend the generator with additional templates, so
that's a good thing to look at too. <br>
<br>
<br>
Claude Knaus wrote:
<blockquote cite="mideugl2h$454$1@build.eclipse.org" type="cite">
<pre wrap="">Hi,

I would like to write JET templates to transform an ecore model into code.
Overriding the default EMF templates using "@generate NOT" is not flexible
enough for me.

Looking at the built-in templates, e.g. Class.javajet, they expect GenClass
to be passed in as argument. I would like to write my own templates which
use GenClass as the input argument.

How can I obtain the GenClass instance when calling generate(Object)?

-- Claude


</pre>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>

--------------030700030401060504010100--
Re: JET: How to obtain GenClass? [message #604034 is a reply to message #77446] Thu, 29 March 2007 15:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050205070204000301080302
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Claude,

If you wish to change existing templates, have a look at previous
answers for how to use dynamic templates:

http://www.eclipse.org/search/search.cgi?q=dynamic+templates &cmd=Search%21&form=extended&wf=574a74&ps=10 &m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.tools. emf&wm=wrd&t=News&t=Mail
< http://www.eclipse.org/search/search.cgi?q=dynamic+templates &cmd=Search%21&form=extended&wf=574a74&ps=10 &m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.tools. emf&wm=wrd&t=News&t=Mail>

The org.eclipse.emf.examples.generator.validator shows a working example
of how to extend the generator with additional templates, so that's a
good thing to look at too.


Claude Knaus wrote:
> Hi,
>
> I would like to write JET templates to transform an ecore model into code.
> Overriding the default EMF templates using "@generate NOT" is not flexible
> enough for me.
>
> Looking at the built-in templates, e.g. Class.javajet, they expect GenClass
> to be passed in as argument. I would like to write my own templates which
> use GenClass as the input argument.
>
> How can I obtain the GenClass instance when calling generate(Object)?
>
> -- Claude
>
>
>


--------------050205070204000301080302
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Claude,<br>
<br>
If you wish to change existing templates, have a look at previous
answers for how to use dynamic templates:<br>
<blockquote><a
href=" http://www.eclipse.org/search/search.cgi?q=dynamic+templates &amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail "> http://www.eclipse.org/search/search.cgi?q=dynamic+templates &amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail </a><br>
</blockquote>
The org.eclipse.emf.examples.generator.validator shows a working
example of how to extend the generator with additional templates, so
that's a good thing to look at too. <br>
<br>
<br>
Claude Knaus wrote:
<blockquote cite="mideugl2h$454$1@build.eclipse.org" type="cite">
<pre wrap="">Hi,

I would like to write JET templates to transform an ecore model into code.
Overriding the default EMF templates using "@generate NOT" is not flexible
enough for me.

Looking at the built-in templates, e.g. Class.javajet, they expect GenClass
to be passed in as argument. I would like to write my own templates which
use GenClass as the input argument.

How can I obtain the GenClass instance when calling generate(Object)?

-- Claude


</pre>
</blockquote>
<br>
</body>
</html>

--------------050205070204000301080302--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: JET: How to obtain GenClass? [message #604065 is a reply to message #77512] Fri, 30 March 2007 09:51 Go to previous message
Claude Knaus is currently offline Claude KnausFriend
Messages: 7
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0070_01C772C1.C7E22650
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Ed,

Thanks for the hint. I added two entries to the EMF FAQ:

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

Cheers,
-- Claude
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:eugmju$kmq$1@build.eclipse.org...
Claude,

If you wish to change existing templates, have a look at previous =
answers for how to use dynamic templates:

=
http://www.eclipse.org/search/search.cgi?q=3Ddynamic+templat es&cmd=3DSear=
ch%21&form=3Dextended&wf=3D574a74&ps=3D10&m= 3Dall&t=3D5&ul=3D%2Fnewslists=
%2Fnews.eclipse.tools.emf&wm=3Dwrd&t=3DNews&t=3D Mail

The org.eclipse.emf.examples.generator.validator shows a working =
example of how to extend the generator with additional templates, so =
that's a good thing to look at too.=20


Claude Knaus wrote:=20
Hi,

I would like to write JET templates to transform an ecore model into =
code.=20
Overriding the default EMF templates using "@generate NOT" is not =
flexible=20
enough for me.

Looking at the built-in templates, e.g. Class.javajet, they expect =
GenClass=20
to be passed in as argument. I would like to write my own templates =
which=20
use GenClass as the input argument.

How can I obtain the GenClass instance when calling generate(Object)?

-- Claude=20


=20

------=_NextPart_000_0070_01C772C1.C7E22650
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Ed,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for the hint. I added two =
entries to the EMF=20
FAQ:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D" http://wiki.eclipse.org/index.php/EMF-FAQ#What_are_Dynamic_T empla=
tes.3F"> http://wiki.eclipse.org/index.php/EMF-FAQ#What_are_Dynamic_T empla=
tes.3F</A></FONT></DIV><U><FONT=20
face=3DArial color=3D#0000ff size=3D2><A=20
href=3D" http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_use_Dynam ic_Te=
mplates.3F"> http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_use_Dynam i=
c_Templates.3F</A></FONT></U>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Cheers,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- Claude</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:eugmju$kmq$1@build.eclipse.org">news:eugmju$kmq$1@build.ecli=
pse.org</A>...</DIV>Claude,<BR><BR>If=20
you wish to change existing templates, have a look at previous answers =
for how=20
to use dynamic templates:<BR>
<BLOCKQUOTE><A=20
=
href=3D" http://www.eclipse.org/search/search.cgi?q=3Ddynamic+templat es&am=
p;cmd=3DSearch%21&amp;form=3Dextended&amp;wf=3D574a7 4&amp;ps=3D10&amp;m=3D=
all&amp;t=3D5&amp;ul=3D%2Fnewslists%2Fnews.eclipse.t ools.emf&amp;wm=3Dwrd=
&amp;t=3DNews&amp;t=3DMail">http://www.eclipse.org/search/search.cgi?q=3D=
dynamic+templates&amp;cmd=3DSearch%21&amp;form=3Dext ended&amp;wf=3D574a74=
&amp;ps=3D10&amp;m=3Dall&amp;t=3D5&amp;ul=3D %2Fnewslists%2Fnews.eclipse.t=
ools.emf&amp;wm=3Dwrd&amp;t=3DNews&amp;t=3DMail</A ><BR></BLOCKQUOTE>The=20
org.eclipse.emf.examples.generator.validator shows a working example =
of how to=20
extend the generator with additional templates, so that's a good thing =
to look=20
at too. <BR><BR><BR>Claude Knaus wrote:=20
<BLOCKQUOTE cite=3Dmideugl2h$454$1@build.eclipse.org =
type=3D"cite"><PRE wrap=3D"">Hi,

I would like to write JET templates to transform an ecore model into =
code.=20
Overriding the default EMF templates using "@generate NOT" is not =
flexible=20
enough for me.

Looking at the built-in templates, e.g. Class.javajet, they expect =
GenClass=20
to be passed in as argument. I would like to write my own templates =
which=20
use GenClass as the input argument.

How can I obtain the GenClass instance when calling generate(Object)?

-- Claude=20


</PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0070_01C772C1.C7E22650--
Re: JET: How to obtain GenClass? [message #604070 is a reply to message #77630] Fri, 30 March 2007 10:00 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030700030401060504010100
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Claude,

Thanks for helping with the FAQ!


Claude Knaus wrote:
> Hi Ed,
>
> Thanks for the hint. I added two entries to the EMF FAQ:
>
> http://wiki.eclipse.org/index.php/EMF-FAQ#What_are_Dynamic_T emplates.3F
> _http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_use_Dyna mic_Templates.3F_
>
>
> Cheers,
> -- Claude
>
> "Ed Merks" <merks@ca.ibm.com <mailto:merks@ca.ibm.com>> wrote in
> message news:eugmju$kmq$1@build.eclipse.org...
> Claude,
>
> If you wish to change existing templates, have a look at previous
> answers for how to use dynamic templates:
>
> http://www.eclipse.org/search/search.cgi?q=dynamic+templates &cmd=Search%21&form=extended&wf=574a74&ps=10 &m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.tools. emf&wm=wrd&t=News&t=Mail
> < http://www.eclipse.org/search/search.cgi?q=dynamic+templates &cmd=Search%21&form=extended&wf=574a74&ps=10 &m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.tools. emf&wm=wrd&t=News&t=Mail>
>
> The org.eclipse.emf.examples.generator.validator shows a working
> example of how to extend the generator with additional templates,
> so that's a good thing to look at too.
>
>
> Claude Knaus wrote:
>> Hi,
>>
>> I would like to write JET templates to transform an ecore model into code.
>> Overriding the default EMF templates using "@generate NOT" is not flexible
>> enough for me.
>>
>> Looking at the built-in templates, e.g. Class.javajet, they expect GenClass
>> to be passed in as argument. I would like to write my own templates which
>> use GenClass as the input argument.
>>
>> How can I obtain the GenClass instance when calling generate(Object)?
>>
>> -- Claude
>>
>>
>>
>


--------------030700030401060504010100
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Claude,<br>
<br>
Thanks for helping with the FAQ!<br>
<br>
<br>
Claude Knaus wrote:
<blockquote cite="mideuimje$8hd$1@build.eclipse.org" type="cite">
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<meta content="MSHTML 6.00.6000.16414" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">Hi Ed,</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Thanks for the hint. I added two
entries to the EMF FAQ:</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2"><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></font></div>
<u><font color="#0000ff" face="Arial" size="2"><a
href=" http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_use_Dynam ic_Templates.3F"> http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_use_Dynam ic_Templates.3F</a></font></u>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Cheers,</font></div>
<div><font face="Arial" size="2">-- Claude</font></div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div>"Ed Merks" &lt;<a href="mailto:merks@ca.ibm.com">merks@ca.ibm.com</a>&gt;
wrote in message <a href="news:eugmju$kmq$1@build.eclipse.org">news:eugmju$kmq$1@build.eclipse.org</a>...</div>
Claude,<br>
<br>
If you wish to change existing templates, have a look at previous
answers for how to use dynamic templates:<br>
<blockquote><a
href=" http://www.eclipse.org/search/search.cgi?q=dynamic+templates &amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail "> http://www.eclipse.org/search/search.cgi?q=dynamic+templates &amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail </a><br>
</blockquote>
The org.eclipse.emf.examples.generator.validator shows a working
example of how to extend the generator with additional templates, so
that's a good thing to look at too. <br>
<br>
<br>
Claude Knaus wrote:
<blockquote cite="mideugl2h$454$1@build.eclipse.org" type="cite">
<pre wrap="">Hi,

I would like to write JET templates to transform an ecore model into code.
Overriding the default EMF templates using "@generate NOT" is not flexible
enough for me.

Looking at the built-in templates, e.g. Class.javajet, they expect GenClass
to be passed in as argument. I would like to write my own templates which
use GenClass as the input argument.

How can I obtain the GenClass instance when calling generate(Object)?

-- Claude


</pre>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>

--------------030700030401060504010100--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:JET: How to obtain GenClass?
Next Topic:TENEO: StoreResource.LOAD_STRATEGY_PARAM
Goto Forum:
  


Current Time: Thu Apr 25 19:41:38 GMT 2024

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

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

Back to the top