Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF saving resources problem
EMF saving resources problem [message #964191] Tue, 30 October 2012 06:29 Go to next message
Mat Mathiew is currently offline Mat Mathiew
Messages: 29
Registered: July 2012
Junior Member
I have a big problem that I cannot figure out for days now with EMF.

I have some multipage editors in an eclipse rcp app and I am using EMF as the model.
I have a class which finds the root of the models and pass it to subsequent pages which modify it and if there is a change the page is set as dirty and the user can save it.

The problem is that *sometimes* without giving error even if the pages are detected as dirty and emf save method is called the data are just not saved!!

I really cannot figure out why this happens and why is it some times only...
Any ideas will be highly appreciated!
Re: EMF saving resources problem [message #964356 is a reply to message #964191] Tue, 30 October 2012 09:01 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25917
Registered: July 2009
Senior Member
Mat,

Comments below.

On 30/10/2012 11:29 AM, Mat Mathiew wrote:
> I have a big problem that I cannot figure out for days now with EMF.
>
> I have some multipage editors in an eclipse rcp app and I am using EMF
> as the model.
> I have a class which finds the root of the models and pass it to
> subsequent pages which modify it and if there is a change the page is
> set as dirty and the user can save it.
You're not using a command stack as in the generated editor?
>
> The problem is that *sometimes* without giving error even if the pages
> are detected as dirty and emf save method is called the data are just
> not saved!!
Failure to save should thrown an exception.
>
> I really cannot figure out why this happens and why is it some times
> only...
You must have a try-catch around the calls to save, because it throws
IOException, so you should see failures there, if they happen.
> Any ideas will be highly appreciated!
Previous Topic:Creating EInt, EString, EDouble programmatically in Java
Next Topic:How to get the org.eclipse.uml2.uml.Type?
Goto Forum:
  


Current Time: Wed Jul 23 22:27:46 EDT 2014

Powered by FUDForum. Page generated in 0.01468 seconds