Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » generation of java code
generation of java code [message #20707] Wed, 06 June 2007 07:08 Go to next message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

I'm looking for a tutorial for java code generation is there any link you
can provide ?

Thanks

Regards,
Alexandre
Re: generation of java code [message #20734 is a reply to message #20707] Wed, 06 June 2007 08:51 Go to previous messageGo to next message
Tex Twil is currently offline Tex TwilFriend
Messages: 179
Registered: July 2009
Senior Member
Here are some tutorials:

http://www-128.ibm.com/developerworks/java/library/os-ecl-je t/index.html?ca=drs
http://www.eclipse.org/articles/Article-JET/jet_tutorial1.ht ml
http://www.eclipse.org/articles/Article-JET2/jet_tutorial2.h tml

Regards,
Re: generation of java code [message #20784 is a reply to message #20734] Wed, 06 June 2007 12:58 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Note that the last two cover what I call 'JET1', which comes from EMF, and
does not support tag libraries.

JET (aka JET2) does include tags to help with Java generatation. The
typically have a java: prefix:

<java:merge/> lets you use EMF's JMerge facility. Put it at the beginning of
a template, and put in Javadoc comments for @generated classes and class
members. java:merge also works on properties files (although it is much
simpler than JMerge. All it does is add missing property definitions - no
@generated is required or allowed).

<java:importsLocation package="...the current package"/> Defines a location
in the template where calculated imports will be inserted. Use in
conjunction with:

<java:import>fully.qualified.java.class</java:import> - Marks the contained
text as importable. The tag will typically replace the text with the
unqualified name of the class, and an an import statement at
the<java:importsLocation/> tag.

<java:class> - an action, typically used in a main.jet template run a
template and create a java class. Can be nested in <java:package> tags,
and/or <ws:folder> or <ws:project> tags (which would represent the source
folder).

Paul


"Tex Twil" <chaljan@hotmail.com> wrote in message
news:634d9d8f8570b4d3a6d00ad8f5234d76$1@www.eclipse.org...
> Here are some tutorials:
>
> http://www-128.ibm.com/developerworks/java/library/os-ecl-je t/index.html?ca=drs
> http://www.eclipse.org/articles/Article-JET/jet_tutorial1.ht ml
> http://www.eclipse.org/articles/Article-JET2/jet_tutorial2.h tml
>
> Regards,
>
>
>
Re: generation of java code [message #20795 is a reply to message #20784] Wed, 06 June 2007 13:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

Thanks Paul for your explanation, where can I get
more informations ?

There is not a lot's of ressources about JET.

Thanks,
Alexandre

"Paul Elder" <pelder@ca.ibm.com> a
Re: generation of java code [message #20819 is a reply to message #20795] Wed, 06 June 2007 13:53 Go to previous messageGo to next message
Tex Twil is currently offline Tex TwilFriend
Messages: 179
Registered: July 2009
Senior Member
This also helps:
http://help.eclipse.org/help32/topic/org.eclipse.jet.doc/get tingStarted/index.xhtml

Regards.
Re: generation of java code [message #20843 is a reply to message #20795] Thu, 07 June 2007 12:22 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Alexandre:

Regrettably, this is very little more information. I am the only developer
on JET currently. Once the Europa release is out, and I have a bit more
time, I plan to start a JET FAQ, and maybe an article or two.

In the meantime, post your questions to this group. I check it frequently.

Paul

"Alexandre Jaquet" <alexjaquet@gmail.com> wrote in message
news:f46cls$j3u$1@build.eclipse.org...
> Thanks Paul for your explanation, where can I get
> more informations ?
>
> There is not a lot's of ressources about JET.
>
> Thanks,
> Alexandre
>
> "Paul Elder" <pelder@ca.ibm.com> a
Previous Topic:[JET2] How to correctly indent/linebreak lines?
Next Topic:[Jet2] Get CompilationUnit from newly generated file
Goto Forum:
  


Current Time: Fri Apr 19 04:17:55 GMT 2024

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

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

Back to the top