Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFStore] Export project to XMI file programatically
[EMFStore] Export project to XMI file programatically [message #1245156] Thu, 13 February 2014 11:31 Go to next message
Kristof Zalecki is currently offline Kristof ZaleckiFriend
Messages: 23
Registered: October 2013
Junior Member
Hi,

is it possible to check out a project from an emfstore server and save
it into an XMI file programatically? And what would be the best way to
do so?
I have already built a program to check out my projects using the Hello
World example and would like to export the projects from ESLocalProject
to a file.

Regards,
Kristof
Re: [EMFStore] Export project to XMI file programatically [message #1245839 is a reply to message #1245156] Fri, 14 February 2014 10:37 Go to previous message
Edgar Mueller is currently offline Edgar MuellerFriend
Messages: 89
Registered: March 2011
Member
Hi Kristof,

by default, EMFStore already stores the contents of a project in a XMI
file under $HOME/.emfstore/client/profiles/<profilename>, where each
projet is saved in its own folder.
But if you nevertheless would like to export a project programatically,
you can make use of the Export/Import functionality of EMFStore.
Please note that this API is not yet public, therefore you need will
need to cast your ESLocalProject to a ESLocalProjectImpl and then get
the ProjectSpace out of it (this is on our TODO list for 1.3, see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=424412).
For instance, to export the contents of a Project you would need to call:

new ExportImportControllerExecutor(
file, new NullProgressMonitor()
).execute(
ExportImportControllerFactory.
Export.
getExportProjectController(getProjectSpace())
);

We also provide handlers if you would like to trigger export/import
functionality from the UI, see the package
org.eclipse.emf.emfstore.internal.client.ui.handlers.exportimport.

Hope this helps.

Cheers,
Edgar


Am 13.02.2014 12:31, schrieb Zalecki, Kristof:
> Hi,
>
> is it possible to check out a project from an emfstore server and save
> it into an XMI file programatically? And what would be the best way to
> do so?
> I have already built a program to check out my projects using the Hello
> World example and would like to export the projects from ESLocalProject
> to a file.
>
> Regards,
> Kristof


--
Edgar Mueller

Get Professional Eclipse Support: http://eclipsesource.com/munich
Previous Topic:Call for Submission: Modeling Symposium @ EclipseCon North America 2014
Next Topic:EMFClient 1.2
Goto Forum:
  


Current Time: Wed Mar 03 03:50:29 GMT 2021

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

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

Back to the top