|
Re: resource change listeners [message #419672 is a reply to message #419671] |
Sun, 01 June 2008 19:00 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Martin,
Comments below.
Martin Geisse wrote:
> Hello,
>
> I am in a situation like this: A consuming entity has created a
> resource set and a resource in it, loaded that resource, and has done
> something with the objects contained in it. Another entity now alters
> the backing storage of the resource through its own ResourceSet and
> Resource objects - for instance, an Eclipse-based editor. The consumer
> shall be notified of the modification such that it can re-load its
> resource and react to the changes.
Things like CDO would actually allow these two things to share a common
model...
>
> When a file is accessed in Eclipse (as an IFile), Eclipse allows to
> install resource change listeners that detect such changes. I'd like
> to do a similar thing with EMF now. I understand that not all resource
> implementations would be able to provide such listeners, e.g.
> resources that are loaded through HTTP requests. However, is it
> possible to do so for implementations that can provide listeners (e.g.
> platform:/resource)?
EMF doesn't provide any APIs for this. You could provide integration
with Eclipse File System EFS and thereby have your backing store
resources managed just like any other workspace resource and simply rely
on the resource delta processing that generated editors already
provide... From an EMF point of you, you need only unload the resource
and reload it with new contents...
>
> Greetings,
> Martin Geisse
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.04124 seconds