Re: [gwt-contrib] Code Generation with APT in GWT 1.5+

23 views
Skip to first unread message
Message has been deleted

John Tamplin

unread,
Aug 21, 2007, 9:44:39 PM8/21/07
to Google-Web-Tool...@googlegroups.com
On 8/21/07, Andrés Testi <andres....@gmail.com> wrote:

I init this thread as Scott suggested here (
http://groups.google.com/group/Google-Web-Toolkit-Contributors/msg/3c3b1799a2ddd21d
).
APT is an API for code generation in Java 5. In Java 6, this API
becomes stable and was included in the javax package.APT has the same
functionallity than Generators, and I think it's a good alternative
for the GWT Generator API. IMHO, support for APT isn't hard to
implement, because this API is included with the JDK.
Please, take a look on this link: http://java.sun.com/javase/6/docs/technotes/guides/apt/index.html

As an aside, while the push this week is to get Java 1.5 functionality in place, we will likely add pieces of 1.6 before the next release of GWT since it is mostly libraries that shouldn't take any additional work in the compiler or other libraries.

--
John A. Tamplin
Software Engineer, Google

Andrés Testi

unread,
Aug 21, 2007, 10:44:06 PM8/21/07
to Google Web Toolkit Contributors
If java 1.5 annotations are enabled, support for APT doesn't requires
none of additional effort, because it's a feature invoked in
compilation time, passing a special parameter in the javac line
command. Having the sources, you only need to invoke the javac
command, and then, new sources are generated. After of this phase, the
GWT compiler can be invoked. Only hosted mode can be minimally
affected. Of course, first is needed support for java 1.5, but I think
that is good to see the future possibilities of GWT.

On 21 ago, 22:44, "John Tamplin" <j...@google.com> wrote:


> On 8/21/07, Andrés Testi <andres.a.te...@gmail.com> wrote:
>
>
>
> > I init this thread as Scott suggested here (
>

> >http://groups.google.com/group/Google-Web-Toolkit-Contributors/msg/3c...

Reinier Zwitserloot

unread,
Aug 21, 2007, 11:45:08 PM8/21/07
to Google Web Toolkit Contributors
What Andrés said. The one thing that GWT needs to do, because pre-
invoking apt by way of javac is a pain in the tusch, is to do the APT
phase itself, simply by calling the APT through the newly introduced
(in java6) compiler call API. This would require GWT to have a JDK and
not just a JRE available but I doubt anyone would care. 1 man-day at
most.

Andrés Testi

unread,
Aug 22, 2007, 5:29:36 AM8/22/07
to Google Web Toolkit Contributors
You're right, it's not easy as I first supposed. ;)

mP

unread,
Aug 22, 2007, 6:41:19 PM8/22/07
to Google Web Toolkit Contributors
Why bother.

Its not as if it actually improves anything in terms of features or
performance. In the end the same code is run just via a different
mechanism.

Reply all
Reply to author
Forward
0 new messages