[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.emf] Re: [Q] Is there a way to update content of Resource when underlying file has changed (other than complete unload and load)
|
Tomas,
It would be very interesting to have an incremental "reconciler". Such a thing
would really be like a "diff"ing tool, only structure-based rather than text
based, and the diffs could be used to drive updates to the original model to
make it like the changed model. I think it's a pretty hard problem to solve,
but oh so useful with so many applications. We don't have any immediate plans
in this area, so contributions would be ever so welcome. ;-)
Tomas Malik wrote:
> Hi,
>
> I know that in EcoreEditor there is implementation of refresh of Resource
> content when there is change in underlying file. But this is not very nice
> solution when you have other Resource that is pointing at it, becouse you
> either end up with refering to proxies or you could have it pointing to
> wrong elements (when there are URI based keys and there was element(s) move
> in container, then URI - which is created from the name of containing
> feature and position in the list of container's owned elements - could no
> longer point to correct element).
>
> Either way when this happens, you have to unload and load back other
> Resources that point to changed resource and again match elements from
> different Resource.
>
> This is quite a big task to achieve and I was wondering whether there is
> some other way to update content of Resource when underlying file has
> changed (e.g. incremental approach) implemented or planned to achieve - I am
> aware that this "incremental approach" is not trivial to achieve, but IMHO
> it seems feasible.
>
> Any comments will be appreciated.
>
> TIA,
>
> Tom