On 2011/01/31 23:11:33, jbrosenberg wrote:
http://gwt-code-reviews.appspot.com/1338801/diff/1/3 File
dev/core/src/com/google/gwt/core/ext/GeneratorContextExtWrapper.java
(right):
http://gwt-code-reviews.appspot.com/1338801/diff/1/3#newcode89
dev/core/src/com/google/gwt/core/ext/GeneratorContextExtWrapper.java:89: }
Hmmm....I'm not sure it's always safe to assume that we'll be in
prodMode here.
One needed fix for most cases is to make GeneratorExt.generate() not
call
GeneratorContextExtWrapper.newInstance() if it knows it has an
instance of
GeneratorContextExt. That generate method (which results in an
instance of this
class being created) is only called now directly by other generators
calling
each other. And then it maybe should be an error to try calling
isProdMode()
here (throw an Exception). Or if defaulting to isProdMode() = true
even when
not really in prod mode is ok, then perhaps this is an ok default for
now. I updated GeneratorExt such that it only wraps GeneratorContexts and not GeneratorContextExts. In this way, if users are just passing on our implementation, things are fine. The expectation is that users aren't manufacturing their own GeneratorContexts out of thin-air and handing them on to our Generators. http://gwt-code-reviews.appspot.com/1338801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
