Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » From Java Class to XMI(Generate an XMI File From a Java Class)
From Java Class to XMI [message #637608] Sun, 07 November 2010 14:22 Go to next message
Ramos is currently offline Ramos
Messages: 1
Registered: November 2010
Location: Spain
Junior Member
Hello,
I am not familier with EMF, i have to realise a program wich can generate an XMI file from a java class.
does anyone know how can i begin. thanks
Re: From Java Class to XMI [message #637611 is a reply to message #637608] Sun, 07 November 2010 14:37 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5481
Registered: July 2009
Senior Member
Am 07.11.2010 20:23, schrieb Ramos:
> Hello,
> I am not familier with EMF, i have to realise a program wich can generate an XMI file from a java class.
> does anyone know how can i begin. thanks
Lars has done a nice tutorial to import Ecore from Java: http://www.vogella.de/articles/EclipseEMFAnnotations/index.h tml

The resulting model can be moved/copied to an XMIResource and saved. VoilĂ  ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: From Java Class to XMI [message #637649 is a reply to message #637608] Mon, 08 November 2010 03:24 Go to previous messageGo to next message
Eclipse User
Originally posted by: formatzeh.gmx.de

Or you can checkout the Java parser and printer from
http://www.jamopp.org You just have to install the Plugin and you'll
get a Java editor which is model based. That means you have a full Java
metamodel and its textual syntax. So you open your Java files with that
editor and just invoke "save as...". Specify YourJavaClass.xmi as new
file name and you're done.

best regards,
Gilbert
Re: From Java Class to XMI [message #637745 is a reply to message #637649] Mon, 08 November 2010 11:29 Go to previous message
Gregoire Dupe is currently offline Gregoire Dupe
Messages: 74
Registered: September 2009
Location: France
Member
Hi,

I'm not sure to understand your question but if you need to get a "model view" of Java code you can also have a look to the MoDisco's Java Discover.

Here is the documentation: http://wiki.eclipse.org/MoDisco/Components/Java/Documentatio n/0.8#Java_Discoverer

To install MoDisco you should have a look to the following page: http://wiki.eclipse.org/MoDisco/Installation

Regards,
Gregoire

Previous Topic:[EMF Store] ECP - Can it be used without EMFStore?
Next Topic:Importing EMFatic into an EMF project
Goto Forum:
  


Current Time: Wed Jul 23 16:22:25 EDT 2014

Powered by FUDForum. Page generated in 0.02649 seconds