Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Resource Unloaded issue
Resource Unloaded issue [message #431715] Wed, 22 July 2009 17:22 Go to next message
Alan is currently offline AlanFriend
Messages: 44
Registered: July 2009
Member
Hi all,

I'll do my best to explain the problem we are having.
So we have an editor in which we create a number of objects which exist
across a number of Resource A and B
where A is ObjectContainer and B is contained objects.
These objects are shared by having them implement a shared interface and are
displayed in a different editor.

The issue we are having is that when I delete one of the contained objects
and choose to close the editor and NOT save (Resource B) the model in memory
is different to the model on disk.
So when I open the editor showing the shared objects, the objects I deleted
(but didn't as I chose not to save) are not showing - which is not the
functionality we want.

It is simply a case of reloading the unloaded resource or is there a
better/smarter way to do it.

thanks
Re: Resource Unloaded issue [message #431746 is a reply to message #431715] Thu, 23 July 2009 15:57 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30692
Registered: July 2009
Senior Member
Alan,

Comments below.

Alan wrote:
> Hi all,
>
> I'll do my best to explain the problem we are having.
> So we have an editor in which we create a number of objects which exist
> across a number of Resource A and B
> where A is ObjectContainer and B is contained objects.
> These objects are shared by having them implement a shared interface and are
> displayed in a different editor.
>
> The issue we are having is that when I delete one of the contained objects
> and choose to close the editor and NOT save (Resource B) the model in memory
> is different to the model on disk.
>
Are the editors sharing the same object? By default each editor has
it's own copy of all the objects.
> So when I open the editor showing the shared objects, the objects I deleted
> (but didn't as I chose not to save) are not showing - which is not the
> functionality we want.
>
So there must be some sort of sharing going on...
> It is simply a case of reloading the unloaded resource or is there a
> better/smarter way to do it.
>
If you close and editor without saving, but are keeping shared objects
in memory, you'd definitely need to unload the resource so it can be
loaded with the on-disk version...
> thanks
>
>
>
Previous Topic:Emfatic as true Ecore concrete syntax
Next Topic:org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www
Goto Forum:
  


Current Time: Sat Dec 14 16:10:00 GMT 2019

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

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

Back to the top