Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [JET]
[JET] [message #890476] Fri, 22 June 2012 07:41 Go to next message
Eclipse UserFriend
hey hi there

I am new to Model to Text transformation and JET. All i know that JET helps in generating code in java, SQL, XML etc using templates. My confusion is If you have to generate code then the metamodel has to be of hte code nature. Means if you have to generate java code you can only do it through java metamodel and not any other metamodel???

Naurin
Re: [JET] [message #890479 is a reply to message #890476] Fri, 22 June 2012 07:47 Go to previous messageGo to next message
Eclipse UserFriend
Hi

If you're just starting with M2T, you might want to research a bit
harder about what M2T language you use.

JET is very well-established but predates modeling.
Acceleo is meta-model driven with OCL expressions complying with the OMG
MOFM2T standard
Xpand is meta-model driven with enhanced Java expressions

Regards

Ed Willink

On 22/06/2012 12:41, noi poi wrote:
> hey hi there
>
> I am new to Model to Text transformation and JET. All i know that JET
> helps in generating code in java, SQL, XML etc using templates. My
> confusion is If you have to generate code then the metamodel has to be
> of hte code nature. Means if you have to generate java code you can
> only do it through java metamodel and not any other metamodel???
>
> Naurin
Re: [JET] [message #890858 is a reply to message #890479] Sat, 23 June 2012 04:43 Go to previous messageGo to next message
Eclipse UserFriend
Thank you Edward for your reply but you see i wanted to know that using any M2T language you can only generate specific code using that specific metamodel.

Java code can only be generated if models are specified in Java metamodel??

Naurin
Re: [JET] [message #890884 is a reply to message #890858] Sat, 23 June 2012 06:15 Go to previous messageGo to next message
Eclipse UserFriend
Hi

You do not seem to understand the abstractions.

M2T uses your (or a library template) to generate text, which just might
happen to be Java or SQL source code. Whether the text actually conforms
to a language specification is entirely down to the diligence of the
template author.

M2M uses your (or a library transformation) to generate 'a' model, which
inherently complies with 'the' target meta-model. If you want inherently
accurate Java then you need to look for a M2M transformation to the Java
meta-model.

Regards

Ed Willink

On 23/06/2012 09:43, noi poi wrote:
> Thank you Edward for your reply but you see i wanted to know that
> using any M2T language you can only generate specific code using that
> specific metamodel.
>
> Java code can only be generated if models are specified in Java
> metamodel??
> Naurin
Re: [JET] [message #891835 is a reply to message #890884] Tue, 26 June 2012 04:50 Go to previous messageGo to next message
Eclipse UserFriend
Thank you Edward for the explaination. So for the correct code generation, you should follow
1. Source metamodel to Java metamodel transformation
2. Java metamodel to Text code generation.

Naurin
Re: [JET] [message #891864 is a reply to message #891835] Tue, 26 June 2012 07:19 Go to previous message
Eclipse UserFriend
Hi

If you're a model purist. Yes. M2M then trivial M2T.

However for a simple transformation, direct to Java saves a step and has
very rapid debugging feedback so it is more 'fun'.

Regards

Ed Willink


On 26/06/2012 09:50, noi poi wrote:
> Thank you Edward for the explaination. So for the correct code
> generation, you should follow
> 1. Source metamodel to Java metamodel transformation
> 2. Java metamodel to Text code generation.
>
> Naurin
Previous Topic:[Acceleo] Extending template with dynamic overriding and class inheritance
Next Topic:[Acceleo] Metamodel resolving and URI
Goto Forum:
  


Current Time: Mon Jun 30 21:32:09 EDT 2025

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

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

Back to the top