I want to use a third-party library, for which I have the source code, in my GWT project.
Right now, it's failing with the well-known "No source code is available for type...; did you forget to inherit a required module" message. I understand that error to be caused by the dependence of the third-party library on a class/method that is not emulated by GWT.
I'm in a pickle because the GWT compiler does not inform me which class/method in the third-party library is causing it t开发者_JS百科o barf. I kind of expected that a lint-like tool for finding unsupported Java constructs would be included in Google's GWT downloads, but I can't find it.
Any suggestions?
In general, if the library doesn't specify to be GWT-compliant, I wouldn't use it. GWT has some black holes that make sense, because the browser is totally different compared to the JVM.
I don't know of any tool to check which class is not GWT-compliant, but I think that you could do it using JDepend. The idea is to run JDepend
specifying the classes that can be used: the emulated JRE classes plus other GWT libraries that you use.
if the code does not depend on incompatible classes, you could just write your own .gwt.xml file for the library and inherit from that too in your own .gwt.xml file.
精彩评论