Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Model Importer Implementation
Model Importer Implementation [message #545901] Fri, 09 July 2010 14:57 Go to next message
Martin Knauer is currently offline Martin KnauerFriend
Messages: 10
Registered: July 2010
Location: Karlsruhe (DE) + Lyon (FR...
Junior Member
Hi,

I'm required to write a model importer along the lines of the XML Schema/Rose/Annotated Java importers used when defining EMF models the usual way.

Unfortunately I was unable to find any documentation on this subject. Also, the sources of the original importers contain very little comments and I have a hard time understanding the code.

I know how to read my input format and how to create a dynamic ecore model from it, but I don't know how to integrate it into an importer like the ones I mentioned above. Also, I'm not sure if creating an dynamic ecore model is the best approach..?

Where is a good place to start looking for information regarding this matter?

I'm new to eclipse development and to EMF, so please excuse me if I missed something obvious...

Kind regards,
Martin

[Updated on: Fri, 09 July 2010 15:05]

Report message to a moderator

Re: Model Importer Implementation [message #545933 is a reply to message #545901] Fri, 09 July 2010 15:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Martin,

You're not missing anything obvious; the documentation is just generally
very sparse. If you look at org.eclipse.emf.importer.java, you'll see
there are very few classes and they're mostly very small. The meaty
part is really things like JavaEcoreBuilder and XSDEcoreBuilder. The
rest is scaffolding. Often it's good to set breakpoints in the methods
and see how they're reached while using the importer in the IDE. I.e.,
more of a dynamic analysis than just staring at static code. In
particular you'll want to understand how the results of the builder are
feed back into the scaffolding and then processed. Most of that's
handled in just a generic way and the specializations you see in the
individual importers just help tweak those results.


Martin Knauer wrote:
> Hi,
>
> I'm required to write a model importer along the lines of the XML
> Schema/Rose/Annotated Java importers used when defining EMF models the
> usual way.
>
> Unfortunately I was unable to find any documentation on this subject.
> Also, the sources of the original importers contain very little
> comments and I have a hard time understanding the code.
>
> I'm new to eclipse development and to EMF, so please excuse me if I
> missed something obvious...
>
> Kind regards,
> Martin


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Model Importer Implementation [message #546259 is a reply to message #545933] Mon, 12 July 2010 10:21 Go to previous messageGo to next message
Martin Knauer is currently offline Martin KnauerFriend
Messages: 10
Registered: July 2010
Location: Karlsruhe (DE) + Lyon (FR...
Junior Member
Thanks for your reply! I will focus on the Builder classes then.
Re: Model Importer Implementation [message #551096 is a reply to message #546259] Thu, 05 August 2010 08:23 Go to previous messageGo to next message
koita Aboubakar is currently offline koita AboubakarFriend
Messages: 11
Registered: April 2010
Junior Member
Hello,

I am also currently trying to generate UML model from from Java annotations through Ecore \ Genmodel .

For the first step, i.e Java2Genmodel, I consulted the org.eclipse.emf.importer.ecore.Java2GenModel plugin documentation at java2GenModel.

I try to run unsuccessfully generation with the following command :
eclipsec -noSplash -clean  -application org.eclipse.emf.importer.java.Java2GenModel    <workspace absolute path for genmodel file to generate>  -package  <file URI of the annoted Java package located in a eclipse project>


This command product only a empty genmodel file without the ecore model.

As Martin said, there is a lack of documentation on the use of these pluging, and I continue to try to understand the code. Meanwhile, I remain interested by any suggestion on the problem.

Best regards,

Aboubakar Koïta
Re: Model Importer Implementation [message #551170 is a reply to message #551096] Thu, 05 August 2010 13:41 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
I would expect most folks to use the ANT tasks for this. We have tests
that use those in org.eclipse.emf.test.tools so you could have a look at
how those run, i.e., extract them from CVS...


koïta Aboubakar wrote:
> Hello,
>
> I am also currently trying to generate UML model from from Java
> annotations through Ecore \ Genmodel .
>
> For the first step, i.e Java2Genmodel, I consulted the
> org.eclipse.emf.importer.ecore.Java2GenModel plugin documentation at
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org .eclipse.emf/plugins/org.eclipse.emf.importer.java/readme.ht ml?root=Modeling_Project&view=co
>
>
> I try to run unsuccessfully generation with the following command :
> eclipsec -noSplash -clean -application
> org.eclipse.emf.importer.java.Java2GenModel <workspace absolute
> path for genmodel file to generate> -package <file URI of the
> annoted Java package located in a eclipse project>
>
>
> This command product only a empty genmodel file without the ecore model.
>
> As Martin said, there is a lack of documentation on the use of these
> pluging, and I continue to try to understand the code. Meanwhile, I
> remain interested by any suggestion on the problem.
>
> Best regards,
>
> Aboubakar Koïta


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Serialize EMF objects in a XMI similar file with another file extension humanresourcemodel
Next Topic:Package with uri 'null' not found ERROR
Goto Forum:
  


Current Time: Thu Apr 25 21:41:03 GMT 2024

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

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

Back to the top