Skip to main content


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 19:22 Go to next message
Ramos is currently offline RamosFriend
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 19:37 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
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 08:24 Go to previous messageGo to next message
Eclipse UserFriend
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 16:29 Go to previous message
Gregoire Dupe is currently offline Gregoire DupeFriend
Messages: 75
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: Fri Apr 26 22:40:07 GMT 2024

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

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

Back to the top