Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » Java Ecore metamodel and M2T Template
Java Ecore metamodel and M2T Template [message #383937] Thu, 02 April 2009 12:06 Go to next message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Hi all,

Although I know that WTP has some sort of Java Ecore metamodel, I cannot
find it. Any reference is welcome. Another question is whether there any
ready XPand or MTL templates for generating Java source code from the
Java Ecore metamodel?

Thanks.

--
Ersin ER
Re: Java Ecore metamodel and M2T Template [message #383940 is a reply to message #383937] Thu, 02 April 2009 12:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Ersin,

The Java Ecore model from WTP was provided by VE I believe. It's
designed purely around reflection, i.e., building a model that extends
Ecore by reflecting on Java beans. There's also an example EMF Java
model in the EMF examples (in the SDK). It provides a model that
doesn't extend Ecore and supports building that an instance from Java
source. It does not support saving back to Java source.

It seems a little funny to want to generate Java from a Java model. If
you already have the Java, why would you need to generate anything,
you'd just save the instance as a .java file...


Ersin ER wrote:
> Hi all,
>
> Although I know that WTP has some sort of Java Ecore metamodel, I
> cannot find it. Any reference is welcome. Another question is whether
> there any ready XPand or MTL templates for generating Java source code
> from the Java Ecore metamodel?
>
> Thanks.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java Ecore metamodel and M2T Template [message #383943 is a reply to message #383940] Thu, 02 April 2009 12:57 Go to previous messageGo to next message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Ed Merks wrote:
> Ersin,
>
> The Java Ecore model from WTP was provided by VE I believe. It's
> designed purely around reflection, i.e., building a model that extends
> Ecore by reflecting on Java beans. There's also an example EMF Java
> model in the EMF examples (in the SDK). It provides a model that
> doesn't extend Ecore and supports building that an instance from Java
> source. It does not support saving back to Java source.

I just saw the example from EMF.

> It seems a little funny to want to generate Java from a Java model. If
> you already have the Java, why would you need to generate anything,
> you'd just save the instance as a .java file...

What do you mean by saving the instance as .java file? If I have an
ecore file which is an xmi serialization of a Java model then it's
clearly not a Java source file. Do I miss anything here?

Thanks.

>
> Ersin ER wrote:
>> Hi all,
>>
>> Although I know that WTP has some sort of Java Ecore metamodel, I
>> cannot find it. Any reference is welcome. Another question is whether
>> there any ready XPand or MTL templates for generating Java source code
>> from the Java Ecore metamodel?
>>
>> Thanks.
>>

--
Ersin ER
Re: Java Ecore metamodel and M2T Template [message #383946 is a reply to message #383943] Thu, 02 April 2009 13:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Ersin,

Comments below.

Ersin ER wrote:
> Ed Merks wrote:
>> Ersin,
>>
>> The Java Ecore model from WTP was provided by VE I believe. It's
>> designed purely around reflection, i.e., building a model that
>> extends Ecore by reflecting on Java beans. There's also an example
>> EMF Java model in the EMF examples (in the SDK). It provides a model
>> that doesn't extend Ecore and supports building that an instance from
>> Java source. It does not support saving back to Java source.
>
> I just saw the example from EMF.
>
>> It seems a little funny to want to generate Java from a Java model.
>> If you already have the Java, why would you need to generate
>> anything, you'd just save the instance as a .java file...
>
> What do you mean by saving the instance as .java file? If I have an
> ecore file which is an xmi serialization of a Java model then it's
> clearly not a Java source file. Do I miss anything here?
Yes, I'd not expect to serialize a Java model as XMI. Java has a well
established exchange syntax already. The example EMF Java model
literally reads/loads a .java file and if it supported save, which it
doesn't, would write back to that same file using proper Java syntax...
>
> Thanks.
>
>>
>> Ersin ER wrote:
>>> Hi all,
>>>
>>> Although I know that WTP has some sort of Java Ecore metamodel, I
>>> cannot find it. Any reference is welcome. Another question is
>>> whether there any ready XPand or MTL templates for generating Java
>>> source code from the Java Ecore metamodel?
>>>
>>> Thanks.
>>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java Ecore metamodel and M2T Template [message #383947 is a reply to message #383946] Thu, 02 April 2009 13:19 Go to previous messageGo to next message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Ed Merks wrote:
> Ersin,
>
> Comments below.
>
> Ersin ER wrote:
>> Ed Merks wrote:
>>> Ersin,
>>>
>>> The Java Ecore model from WTP was provided by VE I believe. It's
>>> designed purely around reflection, i.e., building a model that
>>> extends Ecore by reflecting on Java beans. There's also an example
>>> EMF Java model in the EMF examples (in the SDK). It provides a model
>>> that doesn't extend Ecore and supports building that an instance from
>>> Java source. It does not support saving back to Java source.
>>
>> I just saw the example from EMF.
>>
>>> It seems a little funny to want to generate Java from a Java model.
>>> If you already have the Java, why would you need to generate
>>> anything, you'd just save the instance as a .java file...

In fact Gronback's book gave the idea of generating Java code from a
model. To cite the introduction of section 7.3 of the book:

"7.3. Generating Java

As we've mentioned previously, you must consider at least two
possibilities when generating Java, or any programming language, from
models. The first is to use M2M from a source model into a Java model,
followed by Java generation using dedicated templates. The alternative
is to pass the source model to a set of templates designed to output
Java code. In the former, the logical mapping from one model to the
other takes place in the mappings of QVT; in the latter, the logic
resides in Xpand and Xtend code throughout the templates and extension
files. Sometimes one approach is superior to the other; as with the two
following examples, both are feasible when transforming our
Domain-Neutral Component (DNC) models to Java Persistence API (JPA) code."

As I see now, the book also provides an XPand template to generate Java
source from JEM.

Thanks for your responses.

>> What do you mean by saving the instance as .java file? If I have an
>> ecore file which is an xmi serialization of a Java model then it's
>> clearly not a Java source file. Do I miss anything here?
> Yes, I'd not expect to serialize a Java model as XMI. Java has a well
> established exchange syntax already. The example EMF Java model
> literally reads/loads a .java file and if it supported save, which it
> doesn't, would write back to that same file using proper Java syntax...
>>
>> Thanks.
>>
>>>
>>> Ersin ER wrote:
>>>> Hi all,
>>>>
>>>> Although I know that WTP has some sort of Java Ecore metamodel, I
>>>> cannot find it. Any reference is welcome. Another question is
>>>> whether there any ready XPand or MTL templates for generating Java
>>>> source code from the Java Ecore metamodel?
>>>>
>>>> Thanks.
>>>>
>>
Re: Java Ecore metamodel and M2T Template [message #383950 is a reply to message #383947] Thu, 02 April 2009 13:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Ersin,

Comments below.

Ersin ER wrote:
> Ed Merks wrote:
>> Ersin,
>>
>> Comments below.
>>
>> Ersin ER wrote:
>>> Ed Merks wrote:
>>>> Ersin,
>>>>
>>>> The Java Ecore model from WTP was provided by VE I believe. It's
>>>> designed purely around reflection, i.e., building a model that
>>>> extends Ecore by reflecting on Java beans. There's also an example
>>>> EMF Java model in the EMF examples (in the SDK). It provides a
>>>> model that doesn't extend Ecore and supports building that an
>>>> instance from Java source. It does not support saving back to Java
>>>> source.
>>>
>>> I just saw the example from EMF.
>>>
>>>> It seems a little funny to want to generate Java from a Java
>>>> model. If you already have the Java, why would you need to
>>>> generate anything, you'd just save the instance as a .java file...
>
> In fact Gronback's book gave the idea of generating Java code from a
> model. To cite the introduction of section 7.3 of the book:
>
> "7.3. Generating Java
>
> As we've mentioned previously, you must consider at least two
> possibilities when generating Java, or any programming language, from
> models. The first is to use M2M from a source model into a Java model,
> followed by Java generation using dedicated templates.
It's a little bit like using templates to generate XML from DOM though.
After all, you can simply serialize DOM to XML. Of course when the
Java model doesn't support Java serialization, which the JEM model does
not, then templates make good sense.
> The alternative is to pass the source model to a set of templates
> designed to output Java code. In the former, the logical mapping from
> one model to the other takes place in the mappings of QVT; in the
> latter, the logic resides in Xpand and Xtend code throughout the
> templates and extension files. Sometimes one approach is superior to
> the other; as with the two following examples, both are feasible when
> transforming our Domain-Neutral Component (DNC) models to Java
> Persistence API (JPA) code."
>
> As I see now, the book also provides an XPand template to generate
> Java source from JEM.
:-)
>
> Thanks for your responses.
>
>>> What do you mean by saving the instance as .java file? If I have an
>>> ecore file which is an xmi serialization of a Java model then it's
>>> clearly not a Java source file. Do I miss anything here?
>> Yes, I'd not expect to serialize a Java model as XMI. Java has a
>> well established exchange syntax already. The example EMF Java
>> model literally reads/loads a .java file and if it supported save,
>> which it doesn't, would write back to that same file using proper
>> Java syntax...
>>>
>>> Thanks.
>>>
>>>>
>>>> Ersin ER wrote:
>>>>> Hi all,
>>>>>
>>>>> Although I know that WTP has some sort of Java Ecore metamodel, I
>>>>> cannot find it. Any reference is welcome. Another question is
>>>>> whether there any ready XPand or MTL templates for generating Java
>>>>> source code from the Java Ecore metamodel?
>>>>>
>>>>> Thanks.
>>>>>
>>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java Ecore metamodel and M2T Template [message #384268 is a reply to message #383937] Thu, 02 April 2009 14:17 Go to previous messageGo to next message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Ersin ER pisze:
> Hi all,
>
> Although I know that WTP has some sort of Java Ecore metamodel, I cannot
> find it. Any reference is welcome. Another question is whether there any
> ready XPand or MTL templates for generating Java source code from the
> Java Ecore metamodel?
>
> Thanks.
>

Maybe you would be interested in discussion here:
http://dev.eclipse.org/mhonarc/lists/soc-dev/msg00901.html

I am interested in having EMF model of Java, did not find appropriate so
I use JDT and Xtend to parse Java. I did not like the Ecore example.

It would be really cool to have EMF models of java on different levels
(Java structure and Java source) and use all the cool M2M and M2T for
refactoring, scaffolding, analysis, migration etc.

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #384269 is a reply to message #383947] Thu, 02 April 2009 15:06 Go to previous messageGo to next message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
> In fact Gronback's book gave the idea of generating Java code from a
> model. To cite the introduction of section 7.3 of the book:

Is it from "Eclipse Modeling Project: A Domain-Specific Language
toolkit"? I order that book a month ago and I see that it has really
interesting parts for me, but I still does not have it. Is JEM described
there? Are there other methods of working with Java as model described?

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #384270 is a reply to message #384269] Thu, 02 April 2009 16:24 Go to previous messageGo to next message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Krzysztof Kowalczyk wrote:
>
>
>> In fact Gronback's book gave the idea of generating Java code from a
>> model. To cite the introduction of section 7.3 of the book:
>
> Is it from "Eclipse Modeling Project: A Domain-Specific Language
> toolkit"? I order that book a month ago and I see that it has really
> interesting parts for me, but I still does not have it. Is JEM described
> there? Are there other methods of working with Java as model described?

Yes that's it. I bought the e-book from Informit so I got it just after
it's released.

JEM is described to some extend and it also has qvto code which targets
JEM, as well as XPand templates which query JEM.

It's a nice book, at least it's only the one of its kind. But it could
be much better really.

> Regards,
> Krzysztof Kowalczyk
>

--
Ersin ER
Re: Java Ecore metamodel and M2T Template [message #384271 is a reply to message #384270] Thu, 02 April 2009 17:21 Go to previous messageGo to next message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Ersin ER pisze:
> Yes that's it. I bought the e-book from Informit so I got it just after
> it's released.
>
> JEM is described to some extend and it also has qvto code which targets
> JEM, as well as XPand templates which query JEM.
>
> It's a nice book, at least it's only the one of its kind. But it could
> be much better really.

Thanks, do you know if used version of JEM is compatible with Java 5
language constructs? Can it understand annotations and generics?

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #384272 is a reply to message #384271] Thu, 02 April 2009 19:20 Go to previous messageGo to next message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Krzysztof Kowalczyk wrote:
> Ersin ER pisze:
>> Yes that's it. I bought the e-book from Informit so I got it just
>> after it's released.
>>
>> JEM is described to some extend and it also has qvto code which
>> targets JEM, as well as XPand templates which query JEM.
>>
>> It's a nice book, at least it's only the one of its kind. But it could
>> be much better really.
>
> Thanks, do you know if used version of JEM is compatible with Java 5
> language constructs? Can it understand annotations and generics?

I guess the mentioned metamodel is this:

http://dev.eclipse.org/viewcvs/index.cgi/jeetools/plugins/or g.eclipse.jem/model/java.ecore?root=WebTools_Project&vie w=markup

> Regards,
> Krzysztof Kowalczyk

--
Ersin ER
Re: Java Ecore metamodel and M2T Template [message #384273 is a reply to message #384272] Thu, 02 April 2009 21:17 Go to previous messageGo to next message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Ersin ER pisze:

>
> http://dev.eclipse.org/viewcvs/index.cgi/jeetools/plugins/or g.eclipse.jem/model/java.ecore?root=WebTools_Project&vie w=markup


Thanks for link. When I was doing some research I did check the VE
version and it seems it did not change much since then. It still does
not cover things I need.

Thanks for help.

I wonder how many other EMF Java models are there.
I know about:
- one in Ecore example based on Reflection
- one in VE / WTP (JEM) based on Reflection
- two in MoDisco based on JDT AST
- one in EMFText based on parser generated from Java grammar

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #384274 is a reply to message #384273] Fri, 03 April 2009 04:05 Go to previous messageGo to next message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Hi,

Krzysztof Kowalczyk wrote:
> Ersin ER pisze:
>
>>
>> http://dev.eclipse.org/viewcvs/index.cgi/jeetools/plugins/or g.eclipse.jem/model/java.ecore?root=WebTools_Project&vie w=markup
>
>
>
> Thanks for link. When I was doing some research I did check the VE
> version and it seems it did not change much since then. It still does
> not cover things I need.
>
> Thanks for help.
>
> I wonder how many other EMF Java models are there.
> I know about:
> - one in Ecore example based on Reflection
> - one in VE / WTP (JEM) based on Reflection
> - two in MoDisco based on JDT AST

So does the MoDisco version cover your needs? This seems to be more
comprehensive:

http://dev.eclipse.org/viewsvn/index.cgi/plugins/trunk/org.e clipse.gmt.modisco.j2se5/model/j2se5.ecore?root=Modeling_MOD ISCO&view=markup

> - one in EMFText based on parser generated from Java grammar
>
> Regards,
> Krzysztof Kowalczyk

--
Ersin ER
Re: Java Ecore metamodel and M2T Template [message #384275 is a reply to message #384274] Fri, 03 April 2009 08:46 Go to previous messageGo to next message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
>
> So does the MoDisco version cover your needs? This seems to be more
> comprehensive:
>
> http://dev.eclipse.org/viewsvn/index.cgi/plugins/trunk/org.e clipse.gmt.modisco.j2se5/model/j2se5.ecore?root=Modeling_MOD ISCO&view=markup

It is a full source model, I don't know exactly how, or does it handles
binidings. I did wanted to try it (especially that MoDisco have Java ->
UML transformation for it), but I had problems as it need some changes
to ATL 2.0, but probably they will be in ATL 3.0. You can check last
post on MoDisco group. Before I get the answer I developed my own
solution that works for me for know.

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #384276 is a reply to message #383940] Thu, 09 April 2009 03:18 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
On 2009-04-02 05:21:19 -0700, Ed Merks <Ed.Merks@gmail.com> said:

> Ersin,
>
> The Java Ecore model from WTP was provided by VE I believe. It's
> designed purely around reflection, i.e., building a model that extends
> Ecore by reflecting on Java beans. There's also an example EMF Java
> model in the EMF examples (in the SDK). It provides a model that
> doesn't extend Ecore and supports building that an instance from Java
> source. It does not support saving back to Java source.
>
> It seems a little funny to want to generate Java from a Java model. If
> you already have the Java, why would you need to generate anything,
> you'd just save the instance as a .java file...
>

On the other hand, the example Java model is super-useful for the
inverse. I use it to load java files -- a really simple way to get an
easily tourable Java strucutre. Users can then select Java classes and
they are transformed this into meta-objects within my target ecore
meta-model, and then I can generate code from *that*. :)

BTW, is org.eclipse.emf.java provided as part of any update site
feature? I haven't been able to find it and end up having to build and
include a copy on my own update site.
Re: Java Ecore metamodel and M2T Template [message #384277 is a reply to message #384276] Thu, 09 April 2009 12:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Miles,

No, it's an example so it's only in the SDK and only as something you
unzip into your workspace, not as a functional installed plugin. Most
people would be disturbed by the extra "Open With" editor contribution
for *.java files.



Miles Parker wrote:
> On 2009-04-02 05:21:19 -0700, Ed Merks <Ed.Merks@gmail.com> said:
>
>> Ersin,
>>
>> The Java Ecore model from WTP was provided by VE I believe. It's
>> designed purely around reflection, i.e., building a model that
>> extends Ecore by reflecting on Java beans. There's also an example
>> EMF Java model in the EMF examples (in the SDK). It provides a model
>> that doesn't extend Ecore and supports building that an instance from
>> Java source. It does not support saving back to Java source.
>>
>> It seems a little funny to want to generate Java from a Java model.
>> If you already have the Java, why would you need to generate
>> anything, you'd just save the instance as a .java file...
>>
>
> On the other hand, the example Java model is super-useful for the
> inverse. I use it to load java files -- a really simple way to get an
> easily tourable Java strucutre. Users can then select Java classes and
> they are transformed this into meta-objects within my target ecore
> meta-model, and then I can generate code from *that*. :)
>
> BTW, is org.eclipse.emf.java provided as part of any update site
> feature? I haven't been able to find it and end up having to build and
> include a copy on my own update site.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java Ecore metamodel and M2T Template [message #384279 is a reply to message #384277] Thu, 09 April 2009 17:34 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Good point... since I don't include ..edit or ..editor I don't see that issue.

On 2009-04-09 05:27:46 -0700, Ed Merks <Ed.Merks@gmail.com> said:

> Miles,
>
> No, it's an example so it's only in the SDK and only as something you
> unzip into your workspace, not as a functional installed plugin. Most
> people would be disturbed by the extra "Open With" editor contribution
> for *.java files.
>
>
>
> Miles Parker wrote:
>> On 2009-04-02 05:21:19 -0700, Ed Merks <Ed.Merks@gmail.com> said:
>>
>>> Ersin,
>>>
>>> The Java Ecore model from WTP was provided by VE I believe. It's
>>> designed purely around reflection, i.e., building a model that extends
>>> Ecore by reflecting on Java beans. There's also an example EMF Java
>>> model in the EMF examples (in the SDK). It provides a model that
>>> doesn't extend Ecore and supports building that an instance from Java
>>> source. It does not support saving back to Java source.
>>>
>>> It seems a little funny to want to generate Java from a Java model. If
>>> you already have the Java, why would you need to generate anything,
>>> you'd just save the instance as a .java file...
>>>
>>
>> On the other hand, the example Java model is super-useful for the
>> inverse. I use it to load java files -- a really simple way to get an
>> easily tourable Java strucutre. Users can then select Java classes and
>> they are transformed this into meta-objects within my target ecore
>> meta-model, and then I can generate code from *that*. :)
>>
>> BTW, is org.eclipse.emf.java provided as part of any update site
>> feature? I haven't been able to find it and end up having to build and
>> include a copy on my own update site.
Re: Java Ecore metamodel and M2T Template [message #384425 is a reply to message #384268] Fri, 15 May 2009 15:46 Go to previous messageGo to next message
Michael Shtelma is currently offline Michael ShtelmaFriend
Messages: 10
Registered: July 2009
Junior Member
Hello,

> I am interested in having EMF model of Java, did not find appropriate so
> I use JDT and Xtend to parse Java. I did not like the Ecore example.

I am also interested in instantiating Java MM using xTend or ATL and then
generating java code. I have seen all the MM that was mentioned here, but
can I generate Java code from them? I mean code which contains logic, like
loops, ifs, etc.

I was also thinking about registering Eclipse JDT beans as Java MM in oAW
and instantiating using xTend....but it would be better to have normal
ecore java which can be "serialized" to simple java code..

Best regards,
Michael Shtelma
Re: Java Ecore metamodel and M2T Template [message #384426 is a reply to message #384425] Fri, 15 May 2009 17:37 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6681
Registered: July 2009
Senior Member
Michael,

It may be inadequate or mentioned already but recently I noticed that
the MoDisco project provides a Java syntax model. I never played with it
but you might want to look at it.

Cheers
/Eike

----
http://thegordian.blogspot.com



Michael Shtelma schrieb:
> Hello,
>
>> I am interested in having EMF model of Java, did not find appropriate
>> so I use JDT and Xtend to parse Java. I did not like the Ecore example.
>
> I am also interested in instantiating Java MM using xTend or ATL and
> then generating java code. I have seen all the MM that was mentioned
> here, but can I generate Java code from them? I mean code which
> contains logic, like loops, ifs, etc.
> I was also thinking about registering Eclipse JDT beans as Java MM in
> oAW and instantiating using xTend....but it would be better to have
> normal ecore java which can be "serialized" to simple java code..
>
> Best regards,
> Michael Shtelma
>
>


Re: Java Ecore metamodel and M2T Template [message #384427 is a reply to message #384425] Fri, 15 May 2009 23:44 Go to previous messageGo to next message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Michael Shtelma pisze:
> I am also interested in instantiating Java MM using xTend or ATL and
> then generating java code. I have seen all the MM that was mentioned
> here, but can I generate Java code from them? I mean code which contains
> logic, like loops, ifs, etc.

I switched to http://www.eclipse.org/gmt/modisco/infrastructure/J2SE5/
it is the best option right know.

It correspond to resolved AST, so it knows what is pointed by given
names and you can generate full Java code from it. I already have Xpand
templates that generate Java code (~300 LOC, but without generics and
comments as I don't need them yet). I use it to refactor and modernize
projects.

I had to remove ATL dependencies from J2SE5 discoverer and I generate
ecore model for given project by hand, but you can create workflow
component or Xtend function for that.

> I was also thinking about registering Eclipse JDT beans as Java MM in
> oAW and instantiating using xTend....but it would be better to have
> normal ecore java which can be "serialized" to simple java code..

Java MM works quite well with IJavaModel, but it is not convenient for
AST and bindings.

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #384680 is a reply to message #384427] Mon, 18 May 2009 11:47 Go to previous messageGo to next message
Michael Shtelma is currently offline Michael ShtelmaFriend
Messages: 10
Registered: July 2009
Junior Member
Hello,

Thank you for your answer.

> I switched to http://www.eclipse.org/gmt/modisco/infrastructure/J2SE5/
> it is the best option right know.

I have downloaded from SVN the whole MODISCO project, and I have not
understood which class is capable to generate java code from the model. It
seems to me that they are able only to read the code into the model, not
to perform code generation

Best regards,
Michael Shtelma
Re: Java Ecore metamodel and M2T Template [message #384689 is a reply to message #384680] Tue, 19 May 2009 08:09 Go to previous messageGo to next message
Michael Shtelma is currently offline Michael ShtelmaFriend
Messages: 10
Registered: July 2009
Junior Member
Hello,

>> I switched to http://www.eclipse.org/gmt/modisco/infrastructure/J2SE5/
>> it is the best option right know.

I managed to build the model of existing Java code, but I have not
figured out how to reflect model changes in the java code. The changes are
not automatically propagated to the JDT

Best regards,
Michael Shtelma
Re: Java Ecore metamodel and M2T Template [message #384691 is a reply to message #384689] Tue, 19 May 2009 09:08 Go to previous messageGo to next message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
There is no Java generation provided yet, as I wrote before that I have
done it myself in my use case. This project generate normal Ecore file
so it have no synchronization with Java source.

I don't know your requirements, why do you need model in sync? What do
you want to accomplish?

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #384693 is a reply to message #384691] Tue, 19 May 2009 09:52 Go to previous messageGo to next message
Michael Shtelma is currently offline Michael ShtelmaFriend
Messages: 10
Registered: July 2009
Junior Member
Krzysztof Kowalczyk wrote:

> There is no Java generation provided yet, as I wrote before that I have
> done it myself in my use case. This project generate normal Ecore file
> so it have no synchronization with Java source.

> I don't know your requirements, why do you need model in sync? What do
> you want to accomplish?

> Regards,
> Krzysztof Kowalczyk

Sorry, I have not understood you, I thought that was previous version.

Regarding my requirements, I have to generate Java code from the model, in
other words to instantiate some model and generate corresponding Java
code. As far as I understand, it is possible to do this by instantiating
Eclipse JDT beans.

I am also investigating JEM (part of the Eclipse VE). As far as I
understand, it has needed features.
Re: Java Ecore metamodel and M2T Template [message #496783 is a reply to message #384427] Wed, 11 November 2009 11:16 Go to previous messageGo to next message
Jan Mauersberger is currently offline Jan MauersbergerFriend
Messages: 120
Registered: July 2009
Senior Member
Krzysztof,

I more or less dived into the same "adventure" as you and the others in
this thread. I have the four solutions on my investigation agenda which
were mentioned already, the EMF example, JEM, MoDisc and oAW aka
Xtext/Xtend/Xpand

JEM seems to be outdated and out of the game from the beginning. I've
started with the EMF example and MoDisc by now. The first one does not
support serialization but seems to be fine for my purpose already since
I do only need structure information for time being.

However, serialization will be quickly become an issue. You mentioned
that you did wrote some templates and I'm not quite sure for which of
the technologies you actually did that and (more important) whether you
could imagine to share your results with us ;-)

I'm also wondering whether there is any attempt to further develop the
EMF example and add serialization. The project seems to be still alive
at least (see comments from Marcelo in another thread at
http://www.eclipse.org/forums/index.php?t=msg&goto=41414 8&S=bc1ad57bb4e7b26aa4a584e876ec7c7e)

Jan

> I switched to http://www.eclipse.org/gmt/modisco/infrastructure/J2SE5/
> it is the best option right know.
>
> It correspond to resolved AST, so it knows what is pointed by given
> names and you can generate full Java code from it. I already have Xpand
> templates that generate Java code (~300 LOC, but without generics and
> comments as I don't need them yet). I use it to refactor and modernize
> projects.
Re: Java Ecore metamodel and M2T Template [message #499038 is a reply to message #496783] Thu, 19 November 2009 15:42 Go to previous messageGo to next message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Jan,

Sorry for late reply, I was abroad.
I've added MoDisco newsgroup to the discussion. Maybe they are interested.

> Krzysztof,
>
> I more or less dived into the same "adventure" as you and the others in
> this thread. I have the four solutions on my investigation agenda which
> were mentioned already, the EMF example, JEM, MoDisc and oAW aka
> Xtext/Xtend/Xpand
>
> JEM seems to be outdated and out of the game from the beginning. I've
> started with the EMF example and MoDisc by now. The first one does not
> support serialization but seems to be fine for my purpose already since
> I do only need structure information for time being.

For know I am using MoDisco J2SE5 metamodel/discoverer with small
changes (I have removed ATL dependencies, as I don't use J2SE5 -> KDM ->
UML, nor ATL).

MoDisco have a bit newer (and as they claim better) model/discoverer
http://wiki.eclipse.org/MoDisco/Java , thus I will probably move to it
one day. The metamodel is not much different, so it should be easy.

> However, serialization will be quickly become an issue. You mentioned
> that you did wrote some templates and I'm not quite sure for which of
> the technologies you actually did that and (more important) whether you
> could imagine to share your results with us ;-)

I have working but incomplete templates in Eclipse M2T Xpand for
generating Java code from J2SE5 metamodel. They are not "production
quality". As I said before they do not handle comments, generics and
some basic constructs are missing. It is possible that they have some
errors, as they was not tested much. Nevertheless they works for me ;)

I can share them, preferably as open source contribution.
But, AFAIK MoDisco plans to develop some kind of serialization for Java
model. I am not sure will it be Java or Acceleo based serialization though.

> I'm also wondering whether there is any attempt to further develop the
> EMF example and add serialization. The project seems to be still alive
> at least (see comments from Marcelo in another thread at
> http://www.eclipse.org/forums/index.php?t=msg&goto=41414 8&S=bc1ad57bb4e7b26aa4a584e876ec7c7e)

I don't know that, you can ask on EMF forum.

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #499190 is a reply to message #499038] Fri, 20 November 2009 10:51 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi Krzysztof,

Krzysztof Kowalczyk a écrit :
> Jan,
>
> Sorry for late reply, I was abroad.
> I've added MoDisco newsgroup to the discussion. Maybe they are interested.
>
>> Krzysztof,
>>
>> I more or less dived into the same "adventure" as you and the others
>> in this thread. I have the four solutions on my investigation agenda
>> which were mentioned already, the EMF example, JEM, MoDisc and oAW aka
>> Xtext/Xtend/Xpand
>>
>> JEM seems to be outdated and out of the game from the beginning. I've
>> started with the EMF example and MoDisc by now. The first one does not
>> support serialization but seems to be fine for my purpose already
>> since I do only need structure information for time being.
>
> For know I am using MoDisco J2SE5 metamodel/discoverer with small
> changes (I have removed ATL dependencies, as I don't use J2SE5 -> KDM ->
> UML, nor ATL).
>
> MoDisco have a bit newer (and as they claim better) model/discoverer
> http://wiki.eclipse.org/MoDisco/Java , thus I will probably move to it
> one day. The metamodel is not much different, so it should be easy.

Thanks for your interest in MoDisco.

Please, don't hesitate to provide your feedback on this new Java
metamodel implementation (and corresponding discoverer) ;-)

>
>> However, serialization will be quickly become an issue. You mentioned
>> that you did wrote some templates and I'm not quite sure for which of
>> the technologies you actually did that and (more important) whether
>> you could imagine to share your results with us ;-)
>
> I have working but incomplete templates in Eclipse M2T Xpand for
> generating Java code from J2SE5 metamodel. They are not "production
> quality". As I said before they do not handle comments, generics and
> some basic constructs are missing. It is possible that they have some
> errors, as they was not tested much. Nevertheless they works for me ;)
>
> I can share them, preferably as open source contribution.
> But, AFAIK MoDisco plans to develop some kind of serialization for Java
> model. I am not sure will it be Java or Acceleo based serialization though.

I would be great to have a standard serialization available for the Java
metamodel.

This is something we could discuss and your contribution could be
potentially made available via MoDisco at some point...

Best regards,

Hugo

>
>> I'm also wondering whether there is any attempt to further develop the
>> EMF example and add serialization. The project seems to be still alive
>> at least (see comments from Marcelo in another thread at
>> http://www.eclipse.org/forums/index.php?t=msg&goto=41414 8&S=bc1ad57bb4e7b26aa4a584e876ec7c7e)
>
>
> I don't know that, you can ask on EMF forum.
>
> Regards,
> Krzysztof Kowalczyk


--
-------------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (INRIA & EMN) - Room B206
Ecole des Mines de Nantes
4, rue Alfred Kastler
44307 Nantes Cedex 3 - France
Office: +33 (0)2 51 85 82 21
EMail: hugo.bruneliere@inria.fr
-------------------------------------------------


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Java Ecore metamodel and M2T Template [message #499196 is a reply to message #499038] Fri, 20 November 2009 11:22 Go to previous messageGo to next message
Jan Mauersberger is currently offline Jan MauersbergerFriend
Messages: 120
Registered: July 2009
Senior Member
Krzysztof,

thanks for the reply and pointing out the modisco newsgroup.

> For know I am using MoDisco J2SE5 metamodel/discoverer with small
> changes (I have removed ATL dependencies, as I don't use J2SE5 -> KDM ->
> UML, nor ATL).
>
> MoDisco have a bit newer (and as they claim better) model/discoverer
> http://wiki.eclipse.org/MoDisco/Java , thus I will probably move to it
> one day. The metamodel is not much different, so it should be easy.

I use the same meta model and also do not require KDM etc. However, I
wasn't aware the that the Java meta model is newer - I assumed the other
way around ;-)

> I can share them, preferably as open source contribution.
> But, AFAIK MoDisco plans to develop some kind of serialization for Java
> model. I am not sure will it be Java or Acceleo based serialization though.

I do support that idea and according to Hugo's reply they are interested
in standard Java serialization too.

Best regards
Jan
Re: Java Ecore metamodel and M2T Template [message #499209 is a reply to message #499196] Fri, 20 November 2009 12:21 Go to previous messageGo to next message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Jan Mauersberger:
> I use the same meta model and also do not require KDM etc. However, I
> wasn't aware the that the Java meta model is newer - I assumed the other
> way around ;-)

There are 3 models right know - JavaAST (the oldest one), J2SE5 and
Java. The third one is recommended AFAIK.


Hugo Bruneliere,
It seems that MoDisco is devoted to ATL / Acceleo and my work is in
Xpand / Xtend. Does it matter ?

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #499559 is a reply to message #499209] Mon, 23 November 2009 11:17 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi Krzysztof,

Krzysztof Kowalczyk a écrit :
> Jan Mauersberger:
>> I use the same meta model and also do not require KDM etc. However, I
>> wasn't aware the that the Java meta model is newer - I assumed the
>> other way around ;-)
>
> There are 3 models right know - JavaAST (the oldest one), J2SE5 and
> Java. The third one is recommended AFAIK.

You're right! These three metamodels correspond to the several
iterations that have been made in order to reach a fully satisfying
version, the Java metamodel being this final version.
>
>
> Hugo Bruneliere,
> It seems that MoDisco is devoted to ATL / Acceleo and my work is in
> Xpand / Xtend. Does it matter ?
>

It is true that our current works mainly use ATL as a M2M technology and
Acceleo as a M2T one.

However, MoDisco is not dependent from these technologies: it is
designed so that any kind of M2M or M2T technology may be used within a
given reverse-engineering process.
According to this, several drivers for such different technologies have
already been committed to the project.
Of course, we are open to potential contributors of other drivers for
other technologies ;-)

Best regards,

Hugo

> Regards,
> Krzysztof Kowalczyk


--
-------------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (INRIA & EMN) - Room B206
Ecole des Mines de Nantes
4, rue Alfred Kastler
44307 Nantes Cedex 3 - France
Office: +33 (0)2 51 85 82 21
EMail: hugo.bruneliere@inria.fr
-------------------------------------------------


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Java Ecore metamodel and M2T Template [message #614955 is a reply to message #383937] Thu, 02 April 2009 12:21 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Ersin,

The Java Ecore model from WTP was provided by VE I believe. It's
designed purely around reflection, i.e., building a model that extends
Ecore by reflecting on Java beans. There's also an example EMF Java
model in the EMF examples (in the SDK). It provides a model that
doesn't extend Ecore and supports building that an instance from Java
source. It does not support saving back to Java source.

It seems a little funny to want to generate Java from a Java model. If
you already have the Java, why would you need to generate anything,
you'd just save the instance as a .java file...


Ersin ER wrote:
> Hi all,
>
> Although I know that WTP has some sort of Java Ecore metamodel, I
> cannot find it. Any reference is welcome. Another question is whether
> there any ready XPand or MTL templates for generating Java source code
> from the Java Ecore metamodel?
>
> Thanks.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java Ecore metamodel and M2T Template [message #614957 is a reply to message #383940] Thu, 02 April 2009 12:57 Go to previous message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Ed Merks wrote:
> Ersin,
>
> The Java Ecore model from WTP was provided by VE I believe. It's
> designed purely around reflection, i.e., building a model that extends
> Ecore by reflecting on Java beans. There's also an example EMF Java
> model in the EMF examples (in the SDK). It provides a model that
> doesn't extend Ecore and supports building that an instance from Java
> source. It does not support saving back to Java source.

I just saw the example from EMF.

> It seems a little funny to want to generate Java from a Java model. If
> you already have the Java, why would you need to generate anything,
> you'd just save the instance as a .java file...

What do you mean by saving the instance as .java file? If I have an
ecore file which is an xmi serialization of a Java model then it's
clearly not a Java source file. Do I miss anything here?

Thanks.

>
> Ersin ER wrote:
>> Hi all,
>>
>> Although I know that WTP has some sort of Java Ecore metamodel, I
>> cannot find it. Any reference is welcome. Another question is whether
>> there any ready XPand or MTL templates for generating Java source code
>> from the Java Ecore metamodel?
>>
>> Thanks.
>>

--
Ersin ER
Re: Java Ecore metamodel and M2T Template [message #614958 is a reply to message #383943] Thu, 02 April 2009 13:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Ersin,

Comments below.

Ersin ER wrote:
> Ed Merks wrote:
>> Ersin,
>>
>> The Java Ecore model from WTP was provided by VE I believe. It's
>> designed purely around reflection, i.e., building a model that
>> extends Ecore by reflecting on Java beans. There's also an example
>> EMF Java model in the EMF examples (in the SDK). It provides a model
>> that doesn't extend Ecore and supports building that an instance from
>> Java source. It does not support saving back to Java source.
>
> I just saw the example from EMF.
>
>> It seems a little funny to want to generate Java from a Java model.
>> If you already have the Java, why would you need to generate
>> anything, you'd just save the instance as a .java file...
>
> What do you mean by saving the instance as .java file? If I have an
> ecore file which is an xmi serialization of a Java model then it's
> clearly not a Java source file. Do I miss anything here?
Yes, I'd not expect to serialize a Java model as XMI. Java has a well
established exchange syntax already. The example EMF Java model
literally reads/loads a .java file and if it supported save, which it
doesn't, would write back to that same file using proper Java syntax...
>
> Thanks.
>
>>
>> Ersin ER wrote:
>>> Hi all,
>>>
>>> Although I know that WTP has some sort of Java Ecore metamodel, I
>>> cannot find it. Any reference is welcome. Another question is
>>> whether there any ready XPand or MTL templates for generating Java
>>> source code from the Java Ecore metamodel?
>>>
>>> Thanks.
>>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java Ecore metamodel and M2T Template [message #614960 is a reply to message #383946] Thu, 02 April 2009 13:19 Go to previous message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Ed Merks wrote:
> Ersin,
>
> Comments below.
>
> Ersin ER wrote:
>> Ed Merks wrote:
>>> Ersin,
>>>
>>> The Java Ecore model from WTP was provided by VE I believe. It's
>>> designed purely around reflection, i.e., building a model that
>>> extends Ecore by reflecting on Java beans. There's also an example
>>> EMF Java model in the EMF examples (in the SDK). It provides a model
>>> that doesn't extend Ecore and supports building that an instance from
>>> Java source. It does not support saving back to Java source.
>>
>> I just saw the example from EMF.
>>
>>> It seems a little funny to want to generate Java from a Java model.
>>> If you already have the Java, why would you need to generate
>>> anything, you'd just save the instance as a .java file...

In fact Gronback's book gave the idea of generating Java code from a
model. To cite the introduction of section 7.3 of the book:

"7.3. Generating Java

As we've mentioned previously, you must consider at least two
possibilities when generating Java, or any programming language, from
models. The first is to use M2M from a source model into a Java model,
followed by Java generation using dedicated templates. The alternative
is to pass the source model to a set of templates designed to output
Java code. In the former, the logical mapping from one model to the
other takes place in the mappings of QVT; in the latter, the logic
resides in Xpand and Xtend code throughout the templates and extension
files. Sometimes one approach is superior to the other; as with the two
following examples, both are feasible when transforming our
Domain-Neutral Component (DNC) models to Java Persistence API (JPA) code."

As I see now, the book also provides an XPand template to generate Java
source from JEM.

Thanks for your responses.

>> What do you mean by saving the instance as .java file? If I have an
>> ecore file which is an xmi serialization of a Java model then it's
>> clearly not a Java source file. Do I miss anything here?
> Yes, I'd not expect to serialize a Java model as XMI. Java has a well
> established exchange syntax already. The example EMF Java model
> literally reads/loads a .java file and if it supported save, which it
> doesn't, would write back to that same file using proper Java syntax...
>>
>> Thanks.
>>
>>>
>>> Ersin ER wrote:
>>>> Hi all,
>>>>
>>>> Although I know that WTP has some sort of Java Ecore metamodel, I
>>>> cannot find it. Any reference is welcome. Another question is
>>>> whether there any ready XPand or MTL templates for generating Java
>>>> source code from the Java Ecore metamodel?
>>>>
>>>> Thanks.
>>>>
>>
Re: Java Ecore metamodel and M2T Template [message #614962 is a reply to message #383947] Thu, 02 April 2009 13:33 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Ersin,

Comments below.

Ersin ER wrote:
> Ed Merks wrote:
>> Ersin,
>>
>> Comments below.
>>
>> Ersin ER wrote:
>>> Ed Merks wrote:
>>>> Ersin,
>>>>
>>>> The Java Ecore model from WTP was provided by VE I believe. It's
>>>> designed purely around reflection, i.e., building a model that
>>>> extends Ecore by reflecting on Java beans. There's also an example
>>>> EMF Java model in the EMF examples (in the SDK). It provides a
>>>> model that doesn't extend Ecore and supports building that an
>>>> instance from Java source. It does not support saving back to Java
>>>> source.
>>>
>>> I just saw the example from EMF.
>>>
>>>> It seems a little funny to want to generate Java from a Java
>>>> model. If you already have the Java, why would you need to
>>>> generate anything, you'd just save the instance as a .java file...
>
> In fact Gronback's book gave the idea of generating Java code from a
> model. To cite the introduction of section 7.3 of the book:
>
> "7.3. Generating Java
>
> As we've mentioned previously, you must consider at least two
> possibilities when generating Java, or any programming language, from
> models. The first is to use M2M from a source model into a Java model,
> followed by Java generation using dedicated templates.
It's a little bit like using templates to generate XML from DOM though.
After all, you can simply serialize DOM to XML. Of course when the
Java model doesn't support Java serialization, which the JEM model does
not, then templates make good sense.
> The alternative is to pass the source model to a set of templates
> designed to output Java code. In the former, the logical mapping from
> one model to the other takes place in the mappings of QVT; in the
> latter, the logic resides in Xpand and Xtend code throughout the
> templates and extension files. Sometimes one approach is superior to
> the other; as with the two following examples, both are feasible when
> transforming our Domain-Neutral Component (DNC) models to Java
> Persistence API (JPA) code."
>
> As I see now, the book also provides an XPand template to generate
> Java source from JEM.
:-)
>
> Thanks for your responses.
>
>>> What do you mean by saving the instance as .java file? If I have an
>>> ecore file which is an xmi serialization of a Java model then it's
>>> clearly not a Java source file. Do I miss anything here?
>> Yes, I'd not expect to serialize a Java model as XMI. Java has a
>> well established exchange syntax already. The example EMF Java
>> model literally reads/loads a .java file and if it supported save,
>> which it doesn't, would write back to that same file using proper
>> Java syntax...
>>>
>>> Thanks.
>>>
>>>>
>>>> Ersin ER wrote:
>>>>> Hi all,
>>>>>
>>>>> Although I know that WTP has some sort of Java Ecore metamodel, I
>>>>> cannot find it. Any reference is welcome. Another question is
>>>>> whether there any ready XPand or MTL templates for generating Java
>>>>> source code from the Java Ecore metamodel?
>>>>>
>>>>> Thanks.
>>>>>
>>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java Ecore metamodel and M2T Template [message #615299 is a reply to message #383937] Thu, 02 April 2009 14:17 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Ersin ER pisze:
> Hi all,
>
> Although I know that WTP has some sort of Java Ecore metamodel, I cannot
> find it. Any reference is welcome. Another question is whether there any
> ready XPand or MTL templates for generating Java source code from the
> Java Ecore metamodel?
>
> Thanks.
>

Maybe you would be interested in discussion here:
http://dev.eclipse.org/mhonarc/lists/soc-dev/msg00901.html

I am interested in having EMF model of Java, did not find appropriate so
I use JDT and Xtend to parse Java. I did not like the Ecore example.

It would be really cool to have EMF models of java on different levels
(Java structure and Java source) and use all the cool M2M and M2T for
refactoring, scaffolding, analysis, migration etc.

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #615300 is a reply to message #383947] Thu, 02 April 2009 15:06 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
> In fact Gronback's book gave the idea of generating Java code from a
> model. To cite the introduction of section 7.3 of the book:

Is it from "Eclipse Modeling Project: A Domain-Specific Language
toolkit"? I order that book a month ago and I see that it has really
interesting parts for me, but I still does not have it. Is JEM described
there? Are there other methods of working with Java as model described?

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #615302 is a reply to message #384269] Thu, 02 April 2009 16:24 Go to previous message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Krzysztof Kowalczyk wrote:
>
>
>> In fact Gronback's book gave the idea of generating Java code from a
>> model. To cite the introduction of section 7.3 of the book:
>
> Is it from "Eclipse Modeling Project: A Domain-Specific Language
> toolkit"? I order that book a month ago and I see that it has really
> interesting parts for me, but I still does not have it. Is JEM described
> there? Are there other methods of working with Java as model described?

Yes that's it. I bought the e-book from Informit so I got it just after
it's released.

JEM is described to some extend and it also has qvto code which targets
JEM, as well as XPand templates which query JEM.

It's a nice book, at least it's only the one of its kind. But it could
be much better really.

> Regards,
> Krzysztof Kowalczyk
>

--
Ersin ER
Re: Java Ecore metamodel and M2T Template [message #615303 is a reply to message #384270] Thu, 02 April 2009 17:21 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Ersin ER pisze:
> Yes that's it. I bought the e-book from Informit so I got it just after
> it's released.
>
> JEM is described to some extend and it also has qvto code which targets
> JEM, as well as XPand templates which query JEM.
>
> It's a nice book, at least it's only the one of its kind. But it could
> be much better really.

Thanks, do you know if used version of JEM is compatible with Java 5
language constructs? Can it understand annotations and generics?

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #615305 is a reply to message #384271] Thu, 02 April 2009 19:20 Go to previous message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Krzysztof Kowalczyk wrote:
> Ersin ER pisze:
>> Yes that's it. I bought the e-book from Informit so I got it just
>> after it's released.
>>
>> JEM is described to some extend and it also has qvto code which
>> targets JEM, as well as XPand templates which query JEM.
>>
>> It's a nice book, at least it's only the one of its kind. But it could
>> be much better really.
>
> Thanks, do you know if used version of JEM is compatible with Java 5
> language constructs? Can it understand annotations and generics?

I guess the mentioned metamodel is this:

http://dev.eclipse.org/viewcvs/index.cgi/jeetools/plugins/or g.eclipse.jem/model/java.ecore?root=WebTools_Project&vie w=markup

> Regards,
> Krzysztof Kowalczyk

--
Ersin ER
Re: Java Ecore metamodel and M2T Template [message #615306 is a reply to message #384272] Thu, 02 April 2009 21:17 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Ersin ER pisze:

>
> http://dev.eclipse.org/viewcvs/index.cgi/jeetools/plugins/or g.eclipse.jem/model/java.ecore?root=WebTools_Project&vie w=markup


Thanks for link. When I was doing some research I did check the VE
version and it seems it did not change much since then. It still does
not cover things I need.

Thanks for help.

I wonder how many other EMF Java models are there.
I know about:
- one in Ecore example based on Reflection
- one in VE / WTP (JEM) based on Reflection
- two in MoDisco based on JDT AST
- one in EMFText based on parser generated from Java grammar

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #615307 is a reply to message #384273] Fri, 03 April 2009 04:05 Go to previous message
Ersin ER is currently offline Ersin ERFriend
Messages: 34
Registered: July 2009
Member
Hi,

Krzysztof Kowalczyk wrote:
> Ersin ER pisze:
>
>>
>> http://dev.eclipse.org/viewcvs/index.cgi/jeetools/plugins/or g.eclipse.jem/model/java.ecore?root=WebTools_Project&vie w=markup
>
>
>
> Thanks for link. When I was doing some research I did check the VE
> version and it seems it did not change much since then. It still does
> not cover things I need.
>
> Thanks for help.
>
> I wonder how many other EMF Java models are there.
> I know about:
> - one in Ecore example based on Reflection
> - one in VE / WTP (JEM) based on Reflection
> - two in MoDisco based on JDT AST

So does the MoDisco version cover your needs? This seems to be more
comprehensive:

http://dev.eclipse.org/viewsvn/index.cgi/plugins/trunk/org.e clipse.gmt.modisco.j2se5/model/j2se5.ecore?root=Modeling_MOD ISCO&view=markup

> - one in EMFText based on parser generated from Java grammar
>
> Regards,
> Krzysztof Kowalczyk

--
Ersin ER
Re: Java Ecore metamodel and M2T Template [message #615309 is a reply to message #384274] Fri, 03 April 2009 08:46 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
>
> So does the MoDisco version cover your needs? This seems to be more
> comprehensive:
>
> http://dev.eclipse.org/viewsvn/index.cgi/plugins/trunk/org.e clipse.gmt.modisco.j2se5/model/j2se5.ecore?root=Modeling_MOD ISCO&view=markup

It is a full source model, I don't know exactly how, or does it handles
binidings. I did wanted to try it (especially that MoDisco have Java ->
UML transformation for it), but I had problems as it need some changes
to ATL 2.0, but probably they will be in ATL 3.0. You can check last
post on MoDisco group. Before I get the answer I developed my own
solution that works for me for know.

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #615311 is a reply to message #383940] Thu, 09 April 2009 03:18 Go to previous message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
On 2009-04-02 05:21:19 -0700, Ed Merks <Ed.Merks@gmail.com> said:

> Ersin,
>
> The Java Ecore model from WTP was provided by VE I believe. It's
> designed purely around reflection, i.e., building a model that extends
> Ecore by reflecting on Java beans. There's also an example EMF Java
> model in the EMF examples (in the SDK). It provides a model that
> doesn't extend Ecore and supports building that an instance from Java
> source. It does not support saving back to Java source.
>
> It seems a little funny to want to generate Java from a Java model. If
> you already have the Java, why would you need to generate anything,
> you'd just save the instance as a .java file...
>

On the other hand, the example Java model is super-useful for the
inverse. I use it to load java files -- a really simple way to get an
easily tourable Java strucutre. Users can then select Java classes and
they are transformed this into meta-objects within my target ecore
meta-model, and then I can generate code from *that*. :)

BTW, is org.eclipse.emf.java provided as part of any update site
feature? I haven't been able to find it and end up having to build and
include a copy on my own update site.
Re: Java Ecore metamodel and M2T Template [message #615313 is a reply to message #384276] Thu, 09 April 2009 12:27 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Miles,

No, it's an example so it's only in the SDK and only as something you
unzip into your workspace, not as a functional installed plugin. Most
people would be disturbed by the extra "Open With" editor contribution
for *.java files.



Miles Parker wrote:
> On 2009-04-02 05:21:19 -0700, Ed Merks <Ed.Merks@gmail.com> said:
>
>> Ersin,
>>
>> The Java Ecore model from WTP was provided by VE I believe. It's
>> designed purely around reflection, i.e., building a model that
>> extends Ecore by reflecting on Java beans. There's also an example
>> EMF Java model in the EMF examples (in the SDK). It provides a model
>> that doesn't extend Ecore and supports building that an instance from
>> Java source. It does not support saving back to Java source.
>>
>> It seems a little funny to want to generate Java from a Java model.
>> If you already have the Java, why would you need to generate
>> anything, you'd just save the instance as a .java file...
>>
>
> On the other hand, the example Java model is super-useful for the
> inverse. I use it to load java files -- a really simple way to get an
> easily tourable Java strucutre. Users can then select Java classes and
> they are transformed this into meta-objects within my target ecore
> meta-model, and then I can generate code from *that*. :)
>
> BTW, is org.eclipse.emf.java provided as part of any update site
> feature? I haven't been able to find it and end up having to build and
> include a copy on my own update site.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java Ecore metamodel and M2T Template [message #615316 is a reply to message #384277] Thu, 09 April 2009 17:34 Go to previous message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Good point... since I don't include ..edit or ..editor I don't see that issue.

On 2009-04-09 05:27:46 -0700, Ed Merks <Ed.Merks@gmail.com> said:

> Miles,
>
> No, it's an example so it's only in the SDK and only as something you
> unzip into your workspace, not as a functional installed plugin. Most
> people would be disturbed by the extra "Open With" editor contribution
> for *.java files.
>
>
>
> Miles Parker wrote:
>> On 2009-04-02 05:21:19 -0700, Ed Merks <Ed.Merks@gmail.com> said:
>>
>>> Ersin,
>>>
>>> The Java Ecore model from WTP was provided by VE I believe. It's
>>> designed purely around reflection, i.e., building a model that extends
>>> Ecore by reflecting on Java beans. There's also an example EMF Java
>>> model in the EMF examples (in the SDK). It provides a model that
>>> doesn't extend Ecore and supports building that an instance from Java
>>> source. It does not support saving back to Java source.
>>>
>>> It seems a little funny to want to generate Java from a Java model. If
>>> you already have the Java, why would you need to generate anything,
>>> you'd just save the instance as a .java file...
>>>
>>
>> On the other hand, the example Java model is super-useful for the
>> inverse. I use it to load java files -- a really simple way to get an
>> easily tourable Java strucutre. Users can then select Java classes and
>> they are transformed this into meta-objects within my target ecore
>> meta-model, and then I can generate code from *that*. :)
>>
>> BTW, is org.eclipse.emf.java provided as part of any update site
>> feature? I haven't been able to find it and end up having to build and
>> include a copy on my own update site.
Re: Java Ecore metamodel and M2T Template [message #615735 is a reply to message #384268] Fri, 15 May 2009 15:46 Go to previous message
Michael Shtelma is currently offline Michael ShtelmaFriend
Messages: 10
Registered: July 2009
Junior Member
Hello,

> I am interested in having EMF model of Java, did not find appropriate so
> I use JDT and Xtend to parse Java. I did not like the Ecore example.

I am also interested in instantiating Java MM using xTend or ATL and then
generating java code. I have seen all the MM that was mentioned here, but
can I generate Java code from them? I mean code which contains logic, like
loops, ifs, etc.

I was also thinking about registering Eclipse JDT beans as Java MM in oAW
and instantiating using xTend....but it would be better to have normal
ecore java which can be "serialized" to simple java code..

Best regards,
Michael Shtelma
Re: Java Ecore metamodel and M2T Template [message #615736 is a reply to message #384425] Fri, 15 May 2009 17:37 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6681
Registered: July 2009
Senior Member
Michael,

It may be inadequate or mentioned already but recently I noticed that
the MoDisco project provides a Java syntax model. I never played with it
but you might want to look at it.

Cheers
/Eike

----
http://thegordian.blogspot.com



Michael Shtelma schrieb:
> Hello,
>
>> I am interested in having EMF model of Java, did not find appropriate
>> so I use JDT and Xtend to parse Java. I did not like the Ecore example.
>
> I am also interested in instantiating Java MM using xTend or ATL and
> then generating java code. I have seen all the MM that was mentioned
> here, but can I generate Java code from them? I mean code which
> contains logic, like loops, ifs, etc.
> I was also thinking about registering Eclipse JDT beans as Java MM in
> oAW and instantiating using xTend....but it would be better to have
> normal ecore java which can be "serialized" to simple java code..
>
> Best regards,
> Michael Shtelma
>
>


Re: Java Ecore metamodel and M2T Template [message #615738 is a reply to message #384425] Fri, 15 May 2009 23:44 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Michael Shtelma pisze:
> I am also interested in instantiating Java MM using xTend or ATL and
> then generating java code. I have seen all the MM that was mentioned
> here, but can I generate Java code from them? I mean code which contains
> logic, like loops, ifs, etc.

I switched to http://www.eclipse.org/gmt/modisco/infrastructure/J2SE5/
it is the best option right know.

It correspond to resolved AST, so it knows what is pointed by given
names and you can generate full Java code from it. I already have Xpand
templates that generate Java code (~300 LOC, but without generics and
comments as I don't need them yet). I use it to refactor and modernize
projects.

I had to remove ATL dependencies from J2SE5 discoverer and I generate
ecore model for given project by hand, but you can create workflow
component or Xtend function for that.

> I was also thinking about registering Eclipse JDT beans as Java MM in
> oAW and instantiating using xTend....but it would be better to have
> normal ecore java which can be "serialized" to simple java code..

Java MM works quite well with IJavaModel, but it is not convenient for
AST and bindings.

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #616433 is a reply to message #384427] Mon, 18 May 2009 11:47 Go to previous message
Michael Shtelma is currently offline Michael ShtelmaFriend
Messages: 10
Registered: July 2009
Junior Member
Hello,

Thank you for your answer.

> I switched to http://www.eclipse.org/gmt/modisco/infrastructure/J2SE5/
> it is the best option right know.

I have downloaded from SVN the whole MODISCO project, and I have not
understood which class is capable to generate java code from the model. It
seems to me that they are able only to read the code into the model, not
to perform code generation

Best regards,
Michael Shtelma
Re: Java Ecore metamodel and M2T Template [message #616450 is a reply to message #384680] Tue, 19 May 2009 08:09 Go to previous message
Michael Shtelma is currently offline Michael ShtelmaFriend
Messages: 10
Registered: July 2009
Junior Member
Hello,

>> I switched to http://www.eclipse.org/gmt/modisco/infrastructure/J2SE5/
>> it is the best option right know.

I managed to build the model of existing Java code, but I have not
figured out how to reflect model changes in the java code. The changes are
not automatically propagated to the JDT

Best regards,
Michael Shtelma
Re: Java Ecore metamodel and M2T Template [message #616454 is a reply to message #384689] Tue, 19 May 2009 09:08 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
There is no Java generation provided yet, as I wrote before that I have
done it myself in my use case. This project generate normal Ecore file
so it have no synchronization with Java source.

I don't know your requirements, why do you need model in sync? What do
you want to accomplish?

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #616456 is a reply to message #384691] Tue, 19 May 2009 09:52 Go to previous message
Michael Shtelma is currently offline Michael ShtelmaFriend
Messages: 10
Registered: July 2009
Junior Member
Krzysztof Kowalczyk wrote:

> There is no Java generation provided yet, as I wrote before that I have
> done it myself in my use case. This project generate normal Ecore file
> so it have no synchronization with Java source.

> I don't know your requirements, why do you need model in sync? What do
> you want to accomplish?

> Regards,
> Krzysztof Kowalczyk

Sorry, I have not understood you, I thought that was previous version.

Regarding my requirements, I have to generate Java code from the model, in
other words to instantiate some model and generate corresponding Java
code. As far as I understand, it is possible to do this by instantiating
Eclipse JDT beans.

I am also investigating JEM (part of the Eclipse VE). As far as I
understand, it has needed features.
Re: Java Ecore metamodel and M2T Template [message #618457 is a reply to message #384427] Wed, 11 November 2009 11:16 Go to previous message
Jan Mauersberger is currently offline Jan MauersbergerFriend
Messages: 120
Registered: July 2009
Senior Member
Krzysztof,

I more or less dived into the same "adventure" as you and the others in
this thread. I have the four solutions on my investigation agenda which
were mentioned already, the EMF example, JEM, MoDisc and oAW aka
Xtext/Xtend/Xpand

JEM seems to be outdated and out of the game from the beginning. I've
started with the EMF example and MoDisc by now. The first one does not
support serialization but seems to be fine for my purpose already since
I do only need structure information for time being.

However, serialization will be quickly become an issue. You mentioned
that you did wrote some templates and I'm not quite sure for which of
the technologies you actually did that and (more important) whether you
could imagine to share your results with us ;-)

I'm also wondering whether there is any attempt to further develop the
EMF example and add serialization. The project seems to be still alive
at least (see comments from Marcelo in another thread at
http://www.eclipse.org/forums/index.php?t=msg&goto=41414 8&S=bc1ad57bb4e7b26aa4a584e876ec7c7e)

Jan

> I switched to http://www.eclipse.org/gmt/modisco/infrastructure/J2SE5/
> it is the best option right know.
>
> It correspond to resolved AST, so it knows what is pointed by given
> names and you can generate full Java code from it. I already have Xpand
> templates that generate Java code (~300 LOC, but without generics and
> comments as I don't need them yet). I use it to refactor and modernize
> projects.
Re: Java Ecore metamodel and M2T Template [message #618492 is a reply to message #496783] Thu, 19 November 2009 15:42 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Jan,

Sorry for late reply, I was abroad.
I've added MoDisco newsgroup to the discussion. Maybe they are interested.

> Krzysztof,
>
> I more or less dived into the same "adventure" as you and the others in
> this thread. I have the four solutions on my investigation agenda which
> were mentioned already, the EMF example, JEM, MoDisc and oAW aka
> Xtext/Xtend/Xpand
>
> JEM seems to be outdated and out of the game from the beginning. I've
> started with the EMF example and MoDisc by now. The first one does not
> support serialization but seems to be fine for my purpose already since
> I do only need structure information for time being.

For know I am using MoDisco J2SE5 metamodel/discoverer with small
changes (I have removed ATL dependencies, as I don't use J2SE5 -> KDM ->
UML, nor ATL).

MoDisco have a bit newer (and as they claim better) model/discoverer
http://wiki.eclipse.org/MoDisco/Java , thus I will probably move to it
one day. The metamodel is not much different, so it should be easy.

> However, serialization will be quickly become an issue. You mentioned
> that you did wrote some templates and I'm not quite sure for which of
> the technologies you actually did that and (more important) whether you
> could imagine to share your results with us ;-)

I have working but incomplete templates in Eclipse M2T Xpand for
generating Java code from J2SE5 metamodel. They are not "production
quality". As I said before they do not handle comments, generics and
some basic constructs are missing. It is possible that they have some
errors, as they was not tested much. Nevertheless they works for me ;)

I can share them, preferably as open source contribution.
But, AFAIK MoDisco plans to develop some kind of serialization for Java
model. I am not sure will it be Java or Acceleo based serialization though.

> I'm also wondering whether there is any attempt to further develop the
> EMF example and add serialization. The project seems to be still alive
> at least (see comments from Marcelo in another thread at
> http://www.eclipse.org/forums/index.php?t=msg&goto=41414 8&S=bc1ad57bb4e7b26aa4a584e876ec7c7e)

I don't know that, you can ask on EMF forum.

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #618498 is a reply to message #499038] Fri, 20 November 2009 10:51 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi Krzysztof,

Krzysztof Kowalczyk a écrit :
> Jan,
>
> Sorry for late reply, I was abroad.
> I've added MoDisco newsgroup to the discussion. Maybe they are interested.
>
>> Krzysztof,
>>
>> I more or less dived into the same "adventure" as you and the others
>> in this thread. I have the four solutions on my investigation agenda
>> which were mentioned already, the EMF example, JEM, MoDisc and oAW aka
>> Xtext/Xtend/Xpand
>>
>> JEM seems to be outdated and out of the game from the beginning. I've
>> started with the EMF example and MoDisc by now. The first one does not
>> support serialization but seems to be fine for my purpose already
>> since I do only need structure information for time being.
>
> For know I am using MoDisco J2SE5 metamodel/discoverer with small
> changes (I have removed ATL dependencies, as I don't use J2SE5 -> KDM ->
> UML, nor ATL).
>
> MoDisco have a bit newer (and as they claim better) model/discoverer
> http://wiki.eclipse.org/MoDisco/Java , thus I will probably move to it
> one day. The metamodel is not much different, so it should be easy.

Thanks for your interest in MoDisco.

Please, don't hesitate to provide your feedback on this new Java
metamodel implementation (and corresponding discoverer) ;-)

>
>> However, serialization will be quickly become an issue. You mentioned
>> that you did wrote some templates and I'm not quite sure for which of
>> the technologies you actually did that and (more important) whether
>> you could imagine to share your results with us ;-)
>
> I have working but incomplete templates in Eclipse M2T Xpand for
> generating Java code from J2SE5 metamodel. They are not "production
> quality". As I said before they do not handle comments, generics and
> some basic constructs are missing. It is possible that they have some
> errors, as they was not tested much. Nevertheless they works for me ;)
>
> I can share them, preferably as open source contribution.
> But, AFAIK MoDisco plans to develop some kind of serialization for Java
> model. I am not sure will it be Java or Acceleo based serialization though.

I would be great to have a standard serialization available for the Java
metamodel.

This is something we could discuss and your contribution could be
potentially made available via MoDisco at some point...

Best regards,

Hugo

>
>> I'm also wondering whether there is any attempt to further develop the
>> EMF example and add serialization. The project seems to be still alive
>> at least (see comments from Marcelo in another thread at
>> http://www.eclipse.org/forums/index.php?t=msg&goto=41414 8&S=bc1ad57bb4e7b26aa4a584e876ec7c7e)
>
>
> I don't know that, you can ask on EMF forum.
>
> Regards,
> Krzysztof Kowalczyk


--
-------------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (INRIA & EMN) - Room B206
Ecole des Mines de Nantes
4, rue Alfred Kastler
44307 Nantes Cedex 3 - France
Office: +33 (0)2 51 85 82 21
EMail: hugo.bruneliere@inria.fr
-------------------------------------------------


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Java Ecore metamodel and M2T Template [message #618501 is a reply to message #499038] Fri, 20 November 2009 11:22 Go to previous message
Jan Mauersberger is currently offline Jan MauersbergerFriend
Messages: 120
Registered: July 2009
Senior Member
Krzysztof,

thanks for the reply and pointing out the modisco newsgroup.

> For know I am using MoDisco J2SE5 metamodel/discoverer with small
> changes (I have removed ATL dependencies, as I don't use J2SE5 -> KDM ->
> UML, nor ATL).
>
> MoDisco have a bit newer (and as they claim better) model/discoverer
> http://wiki.eclipse.org/MoDisco/Java , thus I will probably move to it
> one day. The metamodel is not much different, so it should be easy.

I use the same meta model and also do not require KDM etc. However, I
wasn't aware the that the Java meta model is newer - I assumed the other
way around ;-)

> I can share them, preferably as open source contribution.
> But, AFAIK MoDisco plans to develop some kind of serialization for Java
> model. I am not sure will it be Java or Acceleo based serialization though.

I do support that idea and according to Hugo's reply they are interested
in standard Java serialization too.

Best regards
Jan
Re: Java Ecore metamodel and M2T Template [message #618503 is a reply to message #499196] Fri, 20 November 2009 12:21 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Jan Mauersberger:
> I use the same meta model and also do not require KDM etc. However, I
> wasn't aware the that the Java meta model is newer - I assumed the other
> way around ;-)

There are 3 models right know - JavaAST (the oldest one), J2SE5 and
Java. The third one is recommended AFAIK.


Hugo Bruneliere,
It seems that MoDisco is devoted to ATL / Acceleo and my work is in
Xpand / Xtend. Does it matter ?

Regards,
Krzysztof Kowalczyk
Re: Java Ecore metamodel and M2T Template [message #618576 is a reply to message #499209] Mon, 23 November 2009 11:17 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi Krzysztof,

Krzysztof Kowalczyk a écrit :
> Jan Mauersberger:
>> I use the same meta model and also do not require KDM etc. However, I
>> wasn't aware the that the Java meta model is newer - I assumed the
>> other way around ;-)
>
> There are 3 models right know - JavaAST (the oldest one), J2SE5 and
> Java. The third one is recommended AFAIK.

You're right! These three metamodels correspond to the several
iterations that have been made in order to reach a fully satisfying
version, the Java metamodel being this final version.
>
>
> Hugo Bruneliere,
> It seems that MoDisco is devoted to ATL / Acceleo and my work is in
> Xpand / Xtend. Does it matter ?
>

It is true that our current works mainly use ATL as a M2M technology and
Acceleo as a M2T one.

However, MoDisco is not dependent from these technologies: it is
designed so that any kind of M2M or M2T technology may be used within a
given reverse-engineering process.
According to this, several drivers for such different technologies have
already been committed to the project.
Of course, we are open to potential contributors of other drivers for
other technologies ;-)

Best regards,

Hugo

> Regards,
> Krzysztof Kowalczyk


--
-------------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (INRIA & EMN) - Room B206
Ecole des Mines de Nantes
4, rue Alfred Kastler
44307 Nantes Cedex 3 - France
Office: +33 (0)2 51 85 82 21
EMail: hugo.bruneliere@inria.fr
-------------------------------------------------


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Previous Topic:[PMF] CVS Repository and Project Status
Next Topic:[Graphiti] Proposal
Goto Forum:
  


Current Time: Tue Mar 19 06:51:39 GMT 2024

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

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

Back to the top