JsNative in inner classes; OverlayTypesByExample with support for primitive typed arrays; @ClientBundle.Source problem in ClientBundle#13
Open
markus1978 wants to merge 5 commits intoxtext:masterfrom
Conversation
…ive array types in OverlayTypeByExample; added replacement of @ClientBundle.Source to @source since my gwt (or atleast gwt's eclipse plugins) does not interpret it correctly otherwise.
… now only saves each compilation unit once and can deal with multiple compilation units.
…veAnnotationProcessorHelper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had trouble with a couple of issues in auto-gwt. These are my fixes:
JsNative:
a) The original implementation does not work for javascript methods in inner classes.
b) The original implementation did not work for xtend files that cause multiple java compilation units due to multiple toplevel type declarations.
OverlayTypesByExample:
a) The original implementation created code that uses JsArray for primitive types (e.g. JsArray). It seems that gwt does not like that very much. I changed it to generate code with the dedicated types JsArrayString, JsArrayBoolean, etc.
b) The original implementation was using the wrong property keys in the generated javascript method bodies. It used the type name, which is a toFirstUpper of the original keys. I am not a JSON expert, and the RPC seems not a 100% clear on case sensitivity. Anyhow, this caused later problems for me.
ClientBundle:
xtend produces @ClientBundle.Source instead of @source in the generated java files. For Gwt (or at least the eclipse plugins of gwt) this somehow makes a difference and it cannot not find the appropriate css file. In my opinion this is clearly a shortcomming of gwt, but it is far easier to change this annotation ;-). I simply made the processor a CodeGenerationParticipant as well and replaced all occurrences of @ClientBundle.Source. There is probably a better solution?