Thursday, October 4, 2012

Re: compiled file ending with *.htm instead of *.html

On Thursday, October 4, 2012 8:32:13 PM UTC+2, James wrote:
I extended IFrameLinker to return ".cache.htm" in getCompilationExtension. GWT compiler generates all js files ending with "cache.htm" as expected. But nocache.js still has "cache.html" in one place such as "$intern_62 = '.cache.html'". It work fine after I change "cache.html" to "cache.htm" in nocache.js file. I can not find any files containing "cache.html" in gwt-user.jar and gwt-dev.jar.  Any help will be appreciated.

It's probably in /com/google/gwt/core/linker/IFrameTemplate.js 

This file is used as a template to create the nocache.js. You can specify a different template by overriding getSelectionScriptTemplate(TreeLogger logger, LinkerContext context) That would however require you to copy and paste that template file (each time you upgrade to a new version of GWT).

So maybe it's a better idea to override SelectionScriptLinker.generateSelectionScript(TreeLogger logger, LinkerContext context, ArtifactSet artifacts, CompilationResult result) instead, and replace ".cache.html" with ".cache.htm" in the resulting string - a little bit hacky, but the chances that it will break are small.

--
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/-/A94eB-4TFcsJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment