Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Ecore to Emfatic conversion standalone application(Questions regarding standalone application of Ecore to Emfatic conversion)
Ecore to Emfatic conversion standalone application [message #1778967] Tue, 26 December 2017 21:48 Go to next message
Eclipse UserFriend
Dear Eclipse Community,

My team and I are currently working on a simple standalone application that converts all Ecore files (.ecore) in a folder to Emfatic source files (.emf) ( The conversion is already possible with tools such as Epsilon ( where you can right-click on an Ecore file and select "Generate Emfatic Source" to generate the Emfatic source files. This conversion is exactly what we want but we would like this to be programmable and not via the Eclipse IDE GUI. The Emfatic documentation does not contain any information about this and we do not have any experience working with the Eclipse framework.

We have attempted to implement this by using the Emfatic source code ( This includes the code for the conversion, but it appears to only be executable via the pop-up menu within Eclipse as described above. We hope to use this code but to apply it outside of the Eclipse IDE.

Most of the relevant code can be found in

We do not think that we can make use of the IFile class as it does not appear to be applicable for our solution. We are not sure about this but we tried to make use of the class instead. Aside from that, we do not make use of the IProgressMonitor class.

Most of this works except the ecoreResource field does not have any data in its contents even though we can read the data from the file. It throws an exception as it requires data in the ecoreResource field. We do not quite know how the Resource and ResourceSet classes work, and we suspect it might not work as intented because we do not use the IFile class.

We decided to ask about this on the forums before we continue. Perhaps there is an easier solution to this and we would like to hear your thoughts on this. Thank you very much.

Kind regards,

Re: Ecore to Emfatic conversion standalone application [message #1779097 is a reply to message #1778967] Tue, 02 January 2018 18:26 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6457
Registered: July 2009
Senior Member

For interest, what is you use case for Emfatic?

If you use OCLinEcore you get a much better serialization of any embedded OCL and arguably a better serialization of Ecore. You do not have to use stop using *.ecore files although you can use *.oclinecore if you prefer.

Whatever. If you have a UI functionality that you want to re-use programmatcally, use the Plugin Spy Alt-Shift-F1 or Plugin Menu Spy Alt-Shift-F2 to locate the code that you need to copy / call / search for similar code to.


Ed Willink

Re: Ecore to Emfatic conversion standalone application [message #1779131 is a reply to message #1779097] Wed, 03 January 2018 06:08 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30442
Registered: July 2009
Senior Member
Yes, you can see by the commit history in that EMFatic is certainly not the most active project. Certainly OCLInEcore and Xcore are more actively being developed and supported.

In any case, the underlying EMF framework uses URIs to access all underlying storage. So anywhere an IFile is used, it will be converted to a platform:/resource/<workspace-relative-path> which ensures that under the covers the IFile APIs will actually be used to get the bytes. But you could equally well use a file:/ URI or even an http:// URI to access the storage.
Previous Topic:JavaFX support for ECP
Next Topic:Using EMF Resource to iterate over contents of model file
Goto Forum:

Current Time: Mon Sep 16 16:10:15 GMT 2019

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

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

Back to the top