How to get gwt compile error in a gwt generator

Skip to first unread message

Patrice De Saint Steban

Jan 31, 2012, 8:53:22 AM1/31/12

I'm created a generator for automatically build the activityMapper. The generator scan alls Activities defined in the project and build the activityMapper.
I use the JClassType.getSubtypes() for get all subtypes of Activity in the application.
My problems is when a developper do a GWT error in his activity (like add an incorrect import), the generator didn't know the Activity didn't build the activityMapper with the error activity.
Has there are no others references in the project for this activity, the error file is ignored by GWT, and the compilation work well (there are just a NOTICE logged not displayed if the developpers use WARN has debug level).
When the developper test his application, there nothing displayed, there no error.

How can I get all file with error in my generator and stop the compilation, if there are an error in an activity file.

I'm trying to do this with java reflection, but I can't have all subtype from an super class or interface, I trying to scan all classes in the class path, load the class and check if the class is present in the type oracle, but when I load a file with static GWT code (like GWT.create) it's not loaded in Java.

Thanks for the response,

Patrice de Saint Stéban
Reply all
Reply to author
0 new messages