Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » EMF Ecore model from java source code
EMF Ecore model from java source code [message #785873] Sun, 29 January 2012 11:53 Go to next message
Rosario Messineo is currently offline Rosario Messineo
Messages: 2
Registered: January 2012
Junior Member
Hi all,

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,

Rosario
Re: EMF Ecore model from java source code [message #786455 is a reply to message #785873] Mon, 30 January 2012 07:59 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 601
Registered: July 2009
Senior Member
Hi Rosario,

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.

Best regards,

Hugo


------------------------------------------
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 #800106 is a reply to message #786455] Thu, 16 February 2012 12:47 Go to previous messageGo to next message
Gregoire Dupe is currently offline Gregoire Dupe
Messages: 74
Registered: September 2009
Location: France
Member
Hello,

Be careful, the documentation hosted in http://download.eclipse.org/modeling/mdt/modisco/doc/org.eclipse.modisco.doc/ is build from the SVN head. This is not a "released" documentation.

The "released" documentation is embedded in a documentation plug-in (accessible through the menu "Help> Help Contents" in your Eclipse). The released documentation is also accessible in http://help.eclipse.org/

Regards,
Grégoire
Re: EMF Ecore model from java source code [message #801080 is a reply to message #800106] Fri, 17 February 2012 17:21 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1338
Registered: July 2009
Senior Member
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. Smile

cheers,

Miles
Re: EMF Ecore model from java source code [message #801329 is a reply to message #801080] Sat, 18 February 2012 02:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26000
Registered: July 2009
Senior Member
Miles,

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. :)
>
> cheers,
>
> Miles
Re: EMF Ecore model from java source code [message #802645 is a reply to message #801329] Mon, 20 February 2012 03:27 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 522
Registered: July 2009
Senior Member
you could also have a look @ this
Previous Topic:Modisco API
Next Topic:Java AST to GAST?
Goto Forum:
  


Current Time: Sat Aug 23 13:22:51 EDT 2014

Powered by FUDForum. Page generated in 0.01838 seconds