|Re: EMF Model: Listen to changes when modified by other Eclipse [message #1387155 is a reply to message #1387154]
||Tue, 24 June 2014 13:22
| Ed Merks
Registered: July 2009
Note that generated editors have a resource delta listener so they |
update the EMF Resource when the underlying Eclipse workspace IFile is
changed. Also, Eclipse has preferences to poll or be notified by the OS
when the workspace resources change, so the combination of those should
help update the editor when the resources are changed outside of Eclipse
directly in the file system.
On 24/06/2014 3:10 PM, Mauro Condarelli wrote:
> Il 24/06/2014 13:37, Marc Z ha scritto:
>> Hi all,
>> does anyone know if it is possible to get a notification, in case an EMF
>> model is modified outside of Eclipse (e.g. by another Eclipse
> EMF models are a bunch of interlinked classes built at runtime.
> None but the running application can modify them.
> Most likely You refer to "the serialized representation of the model
> on disk" or something similar.
> This has nothing to do with EMF and is strictly dependent on the OS.
> Many Operating systems have means to "watch" certain files or
> directories and to get a notification when something has changed; this
> is how You get the "file modified on disk, do you want to reload?"
> question on many text editors.
> EMF models work in exactly the same way:
> Model is the internal runtime representation.
> On disk there's a serialized representation of the model.
> You can get a notification from OS and reload the model, but it's very
> likely you will have to do some kind of merge, if your application
> already independently changed the model.
> NOTE: situation is a bit different with CDO.
Powered by FUDForum
. Page generated in 0.02040 seconds