On Sunday, June 22, 2014 3:57:49 PM UTC+2, Nicolas Morel wrote:
I looked at annotation processor but there is one thing that is bothering me for my use case.If I have something like this :
@GenMapperpublic interface PersonMapper extends JsonMapper<Person> {}or
@GenMapper
public class Person{
public Child child;
}First compilation, my processor is called and the mapper is generated correctly. If I modify Person in the 1st example or Child in the 2nd one, the processor is not called and the mapper is not up to date unless I do a full recompilation.
Annotation processors are called by javac or whichever tool which compiles / pre-processes your code: javac or your IDE (or javac triggered by your IDE).
So before you see the result in GWT, you have to run the annotation processor (this can be done automatically by your IDE or editor each time your hit Ctrl+S to save your changes).
The thing is: it's totally independent from GWT, it's a pre-processing step before GWT is involved (before you launch DevMode/SuperDevMode/Compiler, before you refresh in DevMode, and/or before your hit "DevMode On" and "Compile" in SuperDevMode).
So if your processor is not called, blame your tool (Eclipse, whatever) or blame yourself for not calling it.
Otherwise, there was a few discussion about integrating a REST api inside GWT some time ago. Is this still planned ? If that's the case, any interest for a serialization mechanism based on Jackson annotations ? :)
Google might be more inclined to use GSON ;-)
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment