Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsNative in inner classes; OverlayTypesByExample with support for primitive typed arrays; @ClientBundle.Source problem in ClientBundle #13

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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