Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsJava Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/383937/#msg_383937
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]]>Ersin ER2009-04-02T12:06:43-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/614955/#msg_614955
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 Merks2009-04-02T12:21:19-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/383940/#msg_383940
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 Merks2009-04-02T12:21:19-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/614957/#msg_614957
> 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]]>Ersin ER2009-04-02T12:57:22-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/383943/#msg_383943
> 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 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 Merks2009-04-02T13:09:52-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/383946/#msg_383946
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 Merks2009-04-02T13:09:52-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/614960/#msg_614960
> 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.
>>>>
>>]]>Ersin ER2009-04-02T13:19:02-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/383947/#msg_383947
> 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.
>>>>
>>]]>Ersin ER2009-04-02T13:19:02-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/614962/#msg_614962
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 Merks2009-04-02T13:33:43-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/383950/#msg_383950
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 Merks2009-04-02T13:33:43-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384268/#msg_384268
> 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.
>
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]]>Krzysztof Kowalczyk2009-04-02T14:17:33-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615299/#msg_615299
> 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.
>
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]]>Krzysztof Kowalczyk2009-04-02T14:17:33-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384269/#msg_384269
> 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]]>Krzysztof Kowalczyk2009-04-02T15:06:38-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615300/#msg_615300
> 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]]>Krzysztof Kowalczyk2009-04-02T15:06:38-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384270/#msg_384270
>
>
>> 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]]>Ersin ER2009-04-02T16:24:49-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615302/#msg_615302
>
>
>> 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]]>Ersin ER2009-04-02T16:24:49-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384271/#msg_384271
> 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]]>Krzysztof Kowalczyk2009-04-02T17:21:50-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615303/#msg_615303
> 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]]>Krzysztof Kowalczyk2009-04-02T17:21:50-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384272/#msg_384272
> 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?
--
Ersin ER]]>Ersin ER2009-04-02T19:20:08-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615305/#msg_615305
> 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?
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
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]]>Krzysztof Kowalczyk2009-04-02T21:17:14-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384274/#msg_384274
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:
> - one in EMFText based on parser generated from Java grammar
>
> Regards,
> Krzysztof Kowalczyk
--
Ersin ER]]>Ersin ER2009-04-03T04:05:53-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615307/#msg_615307
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:
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.
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]]>Krzysztof Kowalczyk2009-04-03T08:46:03-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384276/#msg_384276
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.]]>Miles Parker2009-04-09T03:18:46-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615311/#msg_615311
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.]]>Miles Parker2009-04-09T03:18:46-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384277/#msg_384277
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 Merks2009-04-09T12:27:46-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615313/#msg_615313
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 Merks2009-04-09T12:27:46-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384279/#msg_384279
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.]]>Miles Parker2009-04-09T17:34:54-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615316/#msg_615316
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.]]>Miles Parker2009-04-09T17:34:54-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615735/#msg_615735
> 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]]>Michael Shtelma2009-05-15T15:46:58-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384425/#msg_384425
> 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]]>Michael Shtelma2009-05-15T15:46:58-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615736/#msg_615736
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.
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
>
>]]>Eike Stepper2009-05-15T17:37:03-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384426/#msg_384426
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.
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
>
>]]>Eike Stepper2009-05-15T17:37:03-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/615738/#msg_615738
> 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.
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]]>Krzysztof Kowalczyk2009-05-15T23:44:24-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384427/#msg_384427
> 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.
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]]>Krzysztof Kowalczyk2009-05-15T23:44:24-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384680/#msg_384680
Thank you for your answer.
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]]>Michael Shtelma2009-05-18T11:47:06-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/616433/#msg_616433
Thank you for your answer.
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]]>Michael Shtelma2009-05-18T11:47:06-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/616450/#msg_616450
>> 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]]>Michael Shtelma2009-05-19T08:09:12-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384689/#msg_384689
>> 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]]>Michael Shtelma2009-05-19T08:09:12-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/616454/#msg_616454
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]]>Krzysztof Kowalczyk2009-05-19T09:08:14-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384691/#msg_384691
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]]>Krzysztof Kowalczyk2009-05-19T09:08:14-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/616456/#msg_616456
> 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.]]>Michael Shtelma2009-05-19T09:52:36-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/384693/#msg_384693
> 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.]]>Michael Shtelma2009-05-19T09:52:36-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/496783/#msg_496783
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 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.]]>Jan Mauersberger2009-11-11T11:16:47-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/618457/#msg_618457
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 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.]]>Jan Mauersberger2009-11-11T11:16:47-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/499038/#msg_499038
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.
Regards,
Krzysztof Kowalczyk]]>Krzysztof Kowalczyk2009-11-19T15:42:39-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/618492/#msg_618492
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.
Regards,
Krzysztof Kowalczyk]]>Krzysztof Kowalczyk2009-11-19T15:42:39-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/618498/#msg_618498
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 Bruneliere2009-11-20T10:51:43-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/499190/#msg_499190
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 Bruneliere2009-11-20T10:51:43-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/618501/#msg_618501
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]]>Jan Mauersberger2009-11-20T11:22:27-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/499196/#msg_499196
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]]>Jan Mauersberger2009-11-20T11:22:27-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/618503/#msg_618503
> 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]]>Krzysztof Kowalczyk2009-11-20T12:21:30-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/499209/#msg_499209
> 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]]>Krzysztof Kowalczyk2009-11-20T12:21:30-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/618576/#msg_618576
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 Bruneliere2009-11-23T11:17:05-00:00Re: Java Ecore metamodel and M2T Template
https://www.eclipse.org/forums/index.php/mv/msg/125334/499559/#msg_499559
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 Bruneliere2009-11-23T11:17:05-00:00