EMF resource how to flush to disk [message #967067] |
Thu, 01 November 2012 13:10 |
Mat Mathiew Messages: 29 Registered: July 2012 |
Junior Member |
|
|
I create a new EMF resource:
Resource res = new XMLResourceImpl(uri);
and then I copy the conttents of another resource:
res.getContents().add(
EcoreUtil.copy(contentsOfAnotherResource);
and then i save the first one:
res.save(Collections.EMPTY_MAP)
The problem is that the contents are not flushed to disk, only for example if
I repeat the operation the contents of the first operation will be flushed.
Is theere any way to flush them ? Maybe will some save options that I couldnt find?
[Updated on: Thu, 01 November 2012 13:14] Report message to a moderator
|
|
|
Re: EMF resource how to flush to disk [message #967171 is a reply to message #967067] |
Thu, 01 November 2012 14:51 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Matt,
I expect an input stream to be created, written to, and then closed
during the save process; you can use the debugger to confirm that. There
should be no need for flushing anything. Once the stream is closed,
there's nothing else possible to do with it. What OS are you on? What
uri are you using?
On 01/11/2012 2:10 PM, Mat Mathiew wrote:
> I create a new EMF resource:
>
> Resource res = new XMLResourceImpl(uri);
> and then I copy the conttents of another resource:
>
> res.getContents().add(
> EcoreUtil.copy(contentsOfAnotherResource);
>
> and then i save the first one:
>
> res.save(Collections.EMPTY_MAP)
>
>
> The problem is that the contents are not flushed to disk, only for
> example if
> I repeat the operation the contents of the first operation will be
> flushed.
> Is theere any way to flush them ? Maybe will some save options that I
> couldnt find?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03310 seconds