Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [GWT] EMF and GWT JsInterop (2.8, 3.0)
[GWT] EMF and GWT JsInterop (2.8, 3.0) [message #1693385] Thu, 23 April 2015 16:26 Go to next message
Adrian Price is currently offline Adrian PriceFriend
Messages: 61
Registered: July 2009
Member
Good day EMF/GWT,

This is just by way of an enquiry to see whether there are any plans to
support GWT's evolving JsInterop in the EMF/GWT target platform and code
generator.

I have been following JsInterop with interest, as it promises seamless
interoperability between Java and JavaScript idioms. It allows Java
types, constants and constructors to be annotated for declarative export
to a native JavaScript API. JsInterop is experimental in GWT 2.7. Phase
1 is due for release in the 'imminent' GWT 2.8 but has been hugely
delayed already and may be delayed further by various far-reaching
annotation API changes now being contemplated. Phase 2 is scheduled for
GWT 3.0, Q4 2015 but don't hold your breath.

I am particularly interested in developing design-time tooling to export
to JavaScript the EMF-generated Java APIs for arbitrary
customer-supplied domain models.

I've experimented with using custom JET templates to emit gwt-exporter
and JsInterop annotations (@JsType, @JsExport) to the EMF-generated
classes, with a measure of success and some bugs too. There are,
however, a couple of issues around the EMF common runtime, for example:
- EList / List / Collection / etc. are not exported and thus their APIs
are unavailable to JavaScript. JsInterop does not yet seem to provide
any way to export binary types (unlike the earlier gwt-exporter).
- Java's language-level support for method overloading is incompatible
that of JavaScript, which essentially allows just one method of any
given name and supports overloading dynamically via 'optional
parameters'. Thus, for example, exporting Collection.add(E) and
List.add(int, E) to JavaScript results in name collision and mangling.

I'm thinking that these JsInterop annotations could become part of the
standard templates, enabled via the 'Target Platform = GWT' plus a new
(say) exportToJavaScript = true | false genmodel attributes, settable at
the GenModel, GenPackage, GenClass & GenFeature levels.

I'd be interested to hear anyone's thoughts on this.

Thanks,

Adrian Price
TIBCO Software, Inc.
Re: [GWT] EMF and GWT JsInterop (2.8, 3.0) [message #1693487 is a reply to message #1693385] Fri, 24 April 2015 13:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30551
Registered: July 2009
Senior Member
Adrian,

Comments below.

On 23.04.2015 18:26, Adrian Price wrote:
> Good day EMF/GWT,
>
> This is just by way of an enquiry to see whether there are any plans to
> support GWT's evolving JsInterop in the EMF/GWT target platform and code
> generator.
>
No, the GWT support gets pretty much no love or attention.

> I have been following JsInterop with interest, as it promises seamless
> interoperability between Java and JavaScript idioms. It allows Java
> types, constants and constructors to be annotated for declarative export
> to a native JavaScript API. JsInterop is experimental in GWT 2.7. Phase
> 1 is due for release in the 'imminent' GWT 2.8 but has been hugely
> delayed already and may be delayed further by various far-reaching
> annotation API changes now being contemplated. Phase 2 is scheduled for
> GWT 3.0, Q4 2015 but don't hold your breath.
>
> I am particularly interested in developing design-time tooling to export
> to JavaScript the EMF-generated Java APIs for arbitrary
> customer-supplied domain models.
>
> I've experimented with using custom JET templates to emit gwt-exporter
> and JsInterop annotations (@JsType, @JsExport) to the EMF-generated
> classes, with a measure of success and some bugs too. There are,
> however, a couple of issues around the EMF common runtime, for example:
> - EList / List / Collection / etc. are not exported and thus their APIs
> are unavailable to JavaScript. JsInterop does not yet seem to provide
> any way to export binary types (unlike the earlier gwt-exporter).
> - Java's language-level support for method overloading is incompatible
> that of JavaScript, which essentially allows just one method of any
> given name and supports overloading dynamically via 'optional
> parameters'. Thus, for example, exporting Collection.add(E) and
> List.add(int, E) to JavaScript results in name collision and mangling.
>
> I'm thinking that these JsInterop annotations could become part of the
> standard templates, enabled via the 'Target Platform = GWT' plus a new
> (say) exportToJavaScript = true | false genmodel attributes, settable at
> the GenModel, GenPackage, GenClass & GenFeature levels.
>
> I'd be interested to hear anyone's thoughts on this.
Sounds interesting, but it's hard to imagine having the time to test and
support such new things.
>
> Thanks,
>
> Adrian Price
> TIBCO Software, Inc.
>
Re: [GWT] EMF and GWT JsInterop (2.8, 3.0) [message #1693498 is a reply to message #1693487] Fri, 24 April 2015 14:38 Go to previous messageGo to next message
Adrian Price is currently offline Adrian PriceFriend
Messages: 61
Registered: July 2009
Member
Hi Ed,

Okay, in that case I'll see how far we're able to get on this. If we're
successful there is the possibility that I might be able to get
permission to contribute it back to EMF.

Thanks,

--A
Re: [GWT] EMF and GWT JsInterop (2.8, 3.0) [message #1693545 is a reply to message #1693498] Fri, 24 April 2015 23:15 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30551
Registered: July 2009
Senior Member
Adrian,

I would definitely appreciate the help of people who are making use of
the GWT capabilities.


On 24.04.2015 16:38, Adrian Price wrote:
> Hi Ed,
>
> Okay, in that case I'll see how far we're able to get on this. If we're
> successful there is the possibility that I might be able to get
> permission to contribute it back to EMF.
>
> Thanks,
>
> --A
Previous Topic:Intended behaviour of ItemPropertyDescriptorDecorator
Next Topic:Importing Rose Models
Goto Forum:
  


Current Time: Fri Oct 18 09:04:12 GMT 2019

Powered by FUDForum. Page generated in 0.02512 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top