Skip to content

Conversation

@markus1978
Copy link

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?

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant