|EMF Ecore model from java source code [message #785873]
||Sun, 29 January 2012 11:53
| Rosario Messineo
Registered: January 2012
I am new to MoDisco so I apologize in advance for my trivial questions.
My scope is to obtain an EMF ecore model from some java source code where java classes are not annotated.
I would know if a model transformation workflow exists to get ecore model from java source code.
If the answer is yes, is the first step getting java model using MoDisco?
I have already done this step with Indigo e MoDisco 0.9.
Thanks a lot,
|Re: EMF Ecore model from java source code [message #786455 is a reply to message #785873]
||Mon, 30 January 2012 07:59
| Hugo Bruneliere
Registered: July 2009
Using MoDisco, you can automatically get a complete Java model out of any Java project in your workspace thanks to the available Java Model Discoverer and then navigate it with the Model Browser (cf. official MoDisco documentation, respectively in the "Technologies" and "Infrastructure" sections).
This is already provided for free and you don't need any transformation workflow to realize these first steps.
Of course, after that, you can do what you want with your Java model including transforming it with model transformations technologies such as ATL.
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
|Re: EMF Ecore model from java source code [message #801329 is a reply to message #801080]
||Sat, 18 February 2012 02:26
| Ed Merks
Registered: July 2009
Of course right now, the only way (I think) to do this is to mark up the
source files with appropriate @model annotations, but it would sure be
cool to have a "wizard/tool" that presents just the analyzed Java and
lets you selection "these are the interfaces that are modeled", "these
are the methods that represent feature accessors", "these are methods
that represent operations", and "these are classes that are data
types". Even the case where you have classes in the Java, but want to
generate proper equivalent interface/implementation-class APIs for them
would be nice to handle.
On 17/02/2012 11:21 PM, Miles Parker wrote:
> This is timely for me as I'm wanting to EMF'ify some existing
> infrastructure. I'm wondering if there is any tooling / settings that
> can quickly get you from the Java classes directly to a parallel Ecore
> implementation, i.e. such that you would then have a model that could
> re-produce the origin Java model. What I'm seeing MoDisco product is a
> much deeper introspective model listing all of the getter and setter
> methods for example, but not inferring that those getters and setters
> represent an attribute. Is there a good way to do this kind of
> "simple-minded" conversion?
> btw, I love the MoDisco model browser. :)
Powered by FUDForum
. Page generated in 0.04330 seconds