Problem:
User performs textual refactoring or saves textual editor -> GMF’s resource change listener is notified and reloads the resource -> graphical layout may get lost (problem 1) and operation history of the graphical editor is lost (problem 2).

Note: Problem 1 typically not occurs on-save as editors have already synchronized at that stage.

Solutions:
a) Do not perform refactorings on file level when an editor for the file is open. However, this only solves problem 1 and conflicts with the way refactorings are normally handled by Eclipse.
b) Perform a merge after refactoring, but before GMF is notified of the change. This will only solve problem 1.
c) Change the behavior of GMF’s resource change listener such that it only reloads resources that have not been changed by a Spoofax editor.

Solution c) would solve both problems, but GMF may not provide access to the listener, in which case it will be hard to achieve.

Submitted by Oskar van Rest on 23 May 2013 at 18:51

On 23 May 2013 at 18:53 Oskar van Rest commented:

duplicate


On 23 May 2013 at 18:53 Oskar van Rest closed this issue.

Log in to post comments