Graphical layout preservation fails and operation history is lost on textual refactoring and on save
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
Issue Log
fixed by d) having the resource implementation wait for the analysis to finish
Log in to post comments