|
Re: [EMFStore] Export project to XMI file programatically [message #1245839 is a reply to message #1245156] |
Fri, 14 February 2014 10:37 |
Edgar Mueller 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
|
|
|
Powered by
FUDForum. Page generated in 0.03951 seconds