Friday, 29 July 2011

GWT code generator - For the following type(s), generated source was never committed (did you forget to call commit()?)

For the following type(s), generated source was never committed (did you forget to call commit()?)


When you encounter this issue while implementing a code generator in GWT using ClassSourceFileComposerFactory, ensure you are calling writer.commit(logger). If this is not you are missing, make sure you are passing context to composer.createSourceWriter(context, printWriter);

There are lot of examples out there on code generators that doesn't show context being passed. Without context, your writer doesn't commit your source generation changes.

No comments:

Post a Comment