GWT Generators vs java annotation processing

401 views
Skip to first unread message

Tal Shani

unread,
Jan 21, 2015, 5:30:49 PM1/21/15
to google-web-tool...@googlegroups.com
Hi group,
I was wondering if the preferred way these days is to implement generation using the java annotation API or GWT generators is the way?
Does SDM works with java annotations in the whole edit->save->refresh cycle like the GWT generators do?

Thomas Broyer

unread,
Jan 21, 2015, 6:20:03 PM1/21/15
to google-web-tool...@googlegroups.com
GWT itself won't run annotation processors (yet), but if your IDE runs them automatically on file save then it should work just as well as GWT generators.

Daniel Kurka

unread,
Jan 21, 2015, 6:28:45 PM1/21/15
to google-web-tool...@googlegroups.com
I will be presenting something around that at GWT.create -> http://gwtcreate.com/#agenda-us_room1_event9

On Wed, Jan 21, 2015 at 3:20 PM, Thomas Broyer <t.br...@gmail.com> wrote:
GWT itself won't run annotation processors (yet), but if your IDE runs them automatically on file save then it should work just as well as GWT generators.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/f10371fb-5d57-4a26-8c1b-74a4d726e4e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Katherine Stephens

Bhumika Thaker

unread,
Jan 22, 2015, 5:18:37 AM1/22/15
to google-web-tool...@googlegroups.com
Hi Daniel,

Thanks for sharing gwtcreate link. I just refer this link and just get to know about this event.
Will this event vedio share anywhere who are not attend this event?


Thanks,
Bhumika Thaker


Tal Shani

unread,
Jan 25, 2015, 11:55:45 AM1/25/15
to google-web-tool...@googlegroups.com


@Thomas
Sadly (?!) I use intellij which doesn't compile on save. 
maybe doing some gradle magic to listen to file system changes and compile with -proc:only?!

@Daniel
Will there be a video of that presentation?
Is this project going to be available soon? (nothing relavent when googling "gwt singular")

Thanks,
Tal

On Thursday, January 22, 2015 at 1:28:45 AM UTC+2, Daniel Kurka wrote:
I will be presenting something around that at GWT.create -> http://gwtcreate.com/#agenda-us_room1_event9
On Wed, Jan 21, 2015 at 3:20 PM, Thomas Broyer <t.br...@gmail.com> wrote:
GWT itself won't run annotation processors (yet), but if your IDE runs them automatically on file save then it should work just as well as GWT generators.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.

Jens

unread,
Jan 25, 2015, 12:12:00 PM1/25/15
to google-web-tool...@googlegroups.com
Sadly (?!) I use intellij which doesn't compile on save.  

IntelliJ has auto make. You can enable it in the compiler settings. You might also need to File -> Synchronize to make generated classes visible in the IDE.

-- J.

Tal Shani

unread,
Jan 25, 2015, 2:07:40 PM1/25/15
to google-web-tool...@googlegroups.com
Thanks! 
It's great to learn new things :)
--
You received this message because you are subscribed to a topic in the Google Groups "GWT Contributors" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit-contributors/RYZulixEQWg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/6d3a328b-0ef4-4b53-b0b1-1959d63faca9%40googlegroups.com.

Frank Hossfeld

unread,
Feb 13, 2015, 6:15:42 AM2/13/15
to google-web-tool...@googlegroups.com
@Thomas:
That sounds like GWT will use annotation processing instead of generators in the future. Is it a good idea to start writing annotation processors as an alternative for generators in new projects?    

Thomas Broyer

unread,
Feb 13, 2015, 10:12:50 AM2/13/15
to google-web-tool...@googlegroups.com


On Friday, February 13, 2015 at 12:15:42 PM UTC+1, Frank Hossfeld wrote:
@Thomas:
That sounds like GWT will use annotation processing instead of generators in the future. Is it a good idea to start writing annotation processors as an alternative for generators in new projects?

If you ask for my (very personal) opinion, I'd say that if you can use an annotation processor, then go ahead and do it.
I believe there are still good use-cases for GWT generators (for example, annotation processors are not designed to have dependencies on non-Java sources –such as ui.xml, gss or properties files–, and GWT generators are run once per permutation and can generate code specific to that permutation; choosing the right code-path for a given permutation when generating code through an annotation processor wouldn't be as easy). On the other hand GWT generators require you to fully manage your inputs and outputs if you want to take full advantage of incremental builds and not slow down SDM.

Frank Hossfeld

unread,
Feb 15, 2015, 3:53:49 AM2/15/15
to google-web-tool...@googlegroups.com
Thanks for your response. I am contributing the mvp4g framework. The framework uses annotations for events, presenters views, etc and has not to deal with -ui.xml, -html, css -files. Everything is pure Java. I have rewritten the generators. Now they are using IncrementalGenerators. But, because, the framework rescans the whole application every time and then generates the code, SDM is not as fast as it could be. Thinking about your answer, I will think about changing mvp4g to use annotation processing. This could be a real speed up.  
Reply all
Reply to author
Forward
0 new messages