Saturday, December 19, 2015

Re: Best way to extending existing GWT JRE implementation?



On Sunday, December 20, 2015 at 1:09:01 AM UTC+1, JR Schmidt wrote:
I am attempting to extending an existing GWT JRE implementation.  When a class an existing JRE class is missing, it is straightforward to add the missing class.  However when GWT provides a PARTIAL implementation, I have found no easy way to manually implement one or more missing methods.

I believe that deferred binding might be a possible solution, HOWEVER I am dealing with some shared library code and I don't want to have to resort to GWT.create everywhere.

Deferred binding won't help you there.
 
When I simply try to override the GWT-supplied class (copy/pasting the existing GWT code, and adding to it), the changes to not appear to "stick" and the compiler appears to use the standard classes from gwt-user.jar.

It depends on the classpath order and (more importantly) the ResourceOracle order. See https://code.google.com/p/google-web-toolkit/wiki/ResourceOracle for more information about the ResourceOracle priority (backed up at https://github.com/gwtproject/old_google_code_wiki/blob/master/ResourceOracle.wiki.md)
 
Is there a simple solution to this?  I would like to avoid forking GWT locally to prevent future headache.

IMO, a fork is probably the best here. Shadowing existing super-sources will likely lead to more headache when updating GWT (lesser traceability of changes).
Even better would be to contribute the changes upstream if possible.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment