Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [xcore] Codegen in Xcore
[xcore] Codegen in Xcore [message #753448] Thu, 27 October 2011 09:52 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi there,

I just stumbled over the Xcore project that defines EMF models with an
Xtext syntax. Do you have some more information about the intended
architecture available?

From Ed's example in his blog I understand you can for example define
Operation implementations in Xcore. So far I thought you cannot do this
in ecore, so you have to implement an operation in the generated Java code.

How is this Operation implementation handled? Is it mapped to something
in the genmodel such that it will be available in the generated Java
classes? Is the Xcore to genmodel transformation just a M2M
transformation or does it also generate Java code for such feature that
ecore currently did not have.

Does this question make sense or do I bark up the wrong tree?

Cheers,
Hauke
Re: [xcore] Codegen in Xcore [message #753459 is a reply to message #753448] Thu, 27 October 2011 10:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Hauke,

Comments below.

On 27/10/2011 11:52 AM, Hauke Fuhrmann wrote:
> Hi there,
>
> I just stumbled over the Xcore project that defines EMF models with an
> Xtext syntax. Do you have some more information about the intended
> architecture available?
No, just the code itself right now.
>
> From Ed's example in his blog I understand you can for example define
> Operation implementations in Xcore.
Yes.
> So far I thought you cannot do this in ecore,
No, you can't in Ecore.
> so you have to implement an operation in the generated Java code.
No, the operation implementation is generated from the Xbase logic in
the Xcore model; it can also be interpreted dynamically.
>
> How is this Operation implementation handled?
I just finished committing all the changes to the EMF core to support
the Xcore base that's at github, so with the next 2.8 build of EMF
(tomorrow I think), you'll be able to try it out more easily.
> Is it mapped to something in the genmodel such that it will be
> available in the generated Java classes?
We have a preprocessing phase at compiles it down to Java and encodes it
as an EAnnotation; the generator emits that Java code directly.
> Is the Xcore to genmodel transformation just a M2M transformation
Yes.
> or does it also generate Java code for such feature that ecore
> currently did not have.
During generation, we preprocess the Ecore model (which knows its
mapping back to Xcore) to generate Java code from the Xcore operation
bodies (XBlockExpressions).
>
> Does this question make sense or do I bark up the wrong tree?
Sven and I will be doing a demo at EclipseCon Europe next week. Maybe
you'll be there?
>
> Cheers,
> Hauke


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [xcore] Codegen in Xcore [message #754233 is a reply to message #753459] Tue, 01 November 2011 14:46 Go to previous messageGo to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Am 27.10.2011 12:59, schrieb Ed Merks:
>> Does this question make sense or do I bark up the wrong tree?
> Sven and I will be doing a demo at EclipseCon Europe next week. Maybe
> you'll be there?

Ed, unfortunately I cannot be there.

Cheers,
Hauke
Re: [xcore] Codegen in Xcore [message #754241 is a reply to message #754233] Tue, 01 November 2011 15:18 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Hauke,

I was told that all the sessions will be recorded so you'll be able to
watch the recorded session at some point.

Cheers,
Ed


On 01/11/2011 3:46 PM, Hauke Fuhrmann wrote:
> Am 27.10.2011 12:59, schrieb Ed Merks:
>>> Does this question make sense or do I bark up the wrong tree?
>> Sven and I will be doing a demo at EclipseCon Europe next week. Maybe
>> you'll be there?
>
> Ed, unfortunately I cannot be there.
>
> Cheers,
> Hauke


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:persisting EObjects on the web server (custom resourceSet or jpa/jdo annotations or something else?)
Next Topic:plugin.properties when used standalone
Goto Forum:
  


Current Time: Fri Mar 29 01:13:34 GMT 2024

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

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

Back to the top