Okay, so here's my main issue with the general idea. As far as I can tell, the lifetime of the 'storage' is the same as the lifetime of generator instances.
I sort of see how it's expedient to have it accessible via GeneratorContext... however, the downside is you give up static typing and red squiggleys if you try to lookup something that isn't there. Net-net, I'm not sure we want to add more methods to support, that don't really buy anything. Instead of passing GeneratorContext's everywhere, any Generator subsystem could pass around a strongly-typed thing instead; or even extend GeneratorContext and add a couple of strongly-typed getters. http://gwt-code-reviews.appspot.com/826802/diff/3001/4001 File dev/core/src/com/google/gwt/core/ext/GeneratorContext.java (right): http://gwt-code-reviews.appspot.com/826802/diff/3001/4001#newcode88 dev/core/src/com/google/gwt/core/ext/GeneratorContext.java:88: * com / google / gwt / core / client / Foo.properties</code> would be exposed Formatter hates you. http://gwt-code-reviews.appspot.com/826802/diff/3001/4002 File dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java (right): http://gwt-code-reviews.appspot.com/826802/diff/3001/4002#newcode502 dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java:502: return 0; Thought you'd already committed this. :) http://gwt-code-reviews.appspot.com/826802/diff/3001/4004 File dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java (right): http://gwt-code-reviews.appspot.com/826802/diff/3001/4004#newcode251 dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java:251: private final Map<String, Object> storage = new HashMap<String, Object>(); As far as I can tell, lifetime of this map should be exactly the same as the lifetime of "generators", right? http://gwt-code-reviews.appspot.com/826802/diff/3001/4004#newcode272 dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java:272: generators.clear(); For sure you want to storage.clear() here. http://gwt-code-reviews.appspot.com/826802/diff/3001/4005 File dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java (left): http://gwt-code-reviews.appspot.com/826802/diff/3001/4005#oldcode486 dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java:486: Memory.maybeDumpMemory("GoldenCudsBuilt"); You've verified that the i18n cached state gets cleared here? http://gwt-code-reviews.appspot.com/826802/diff/3001/4009 File user/src/com/google/gwt/i18n/rebind/AnnotationsResource.java (right): http://gwt-code-reviews.appspot.com/826802/diff/3001/4009#newcode413 user/src/com/google/gwt/i18n/rebind/AnnotationsResource.java:413: throws AnnotationsError { No real changes in this file. http://gwt-code-reviews.appspot.com/826802/diff/3001/4017 File user/src/com/google/gwt/i18n/rebind/ResourceFactory.java (right): http://gwt-code-reviews.appspot.com/826802/diff/3001/4017#newcode84 user/src/com/google/gwt/i18n/rebind/ResourceFactory.java:84: String key = ResourceFactory.classLocale(clazz, locale); By the way, there's a class you could use here that might interest you: com.google.gwt.dev.util.StringKey. http://gwt-code-reviews.appspot.com/826802/diff/3001/4017#newcode112 user/src/com/google/gwt/i18n/rebind/ResourceFactory.java:112: Extra space http://gwt-code-reviews.appspot.com/826802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors