Skip to main content



      Home
Home » Modeling » EMF » EMF resource how to flush to disk
EMF resource how to flush to disk [message #967067] Thu, 01 November 2012 09:10 Go to next message
Eclipse UserFriend
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 09:14] by Moderator

Re: EMF resource how to flush to disk [message #967171 is a reply to message #967067] Thu, 01 November 2012 10:51 Go to previous message
Eclipse UserFriend
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?
Previous Topic:Reading attribute value from EObject programmatically
Next Topic:XML (Structured) Text editor synchronized with EMF view
Goto Forum:
  


Current Time: Wed Jul 23 07:31:42 EDT 2025

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

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

Back to the top