OK, thanks for the explanation. I see one drawback in the way you implemented it: you're looking at all the types in the TypeOracle, and putting them in a map; that means the compiler cannot prune unused listeners, as all listeners *are* potentially used (they're referenced in the map). This is the same kind of drawback as GWT-RPC, where referencing List<?> will compile in all List subclasses even if you only ever transfer ArrayList<?>s (and e.g. never transfer Collections$EmptyList, Collections$SingletonList, Collections$UnmodifiableList or Arrays$ArrayList).
Overcoming this implies referencing all the listeners you *want* to use, either in an annotation (similar to @WithTokenizers on PlaceHistoryMapper, or RequestFactory's @ExtraTypes) or in an interface (similar to GIN's Ginjector, or RequestFactory) and let the user do the GWT.create(). It only changes slightly the event bus setup (GWT.create() on a custom class/interface instead of "new EventBus()", or something similar). Also, if you want to be able to share code between your client and server, you'd want the client-side code to be "compatible" with the server-side one, while using different implementations. You can do that easily with super-source; see http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/9UfoPI0swK4J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
