Changes between Version 1 and Version 2 of EmacsInterface/Undo


Ignore:
Timestamp:
May 25, 2012, 1:54:09 PM (13 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EmacsInterface/Undo

    v1 v2  
    1 Undo manual 
     1=== Undo === 
     2 
     3RefactorErl had an undo operation for refactorings, but with this method  
     4could you lose some modifications. Namely if the you edit the text after a 
     5refactoring, then undo the changes, all changes since the last 
     6refactoring were lost. This undo was one step only, but it could be 
     7extended to more steps. 
     8However, if we extend this undo, at refactoring undo there can arise 
     9conflicts among changes of editing and the transformations - and also among  
     10two transformations -, but refactoring undo should handle these conflicts, and it must be as 
     11complete as possible. 
     12In this section we introduce a new undo/redo mechanism for the tool integrated in Emacs. 
     13 
     14==== Installation ==== 
     15 
     16The new undo mechanism is disabled by default, to enable it, we need additional software components. 
     17This extended undo is implemented by a stand alone Haskell program, so we need ghci Haskell Compiler  
     18and cabal packaging system, that makes easier the installation of the required packages, modules. 
     19The Haskell compiler can be downloaded from the website http://www.haskell.org/ghc/download. Cabal is 
     20available at  http://www.haskell.org/cabal/download.html or on Linux systems with {cabal-install} package.  
     21The files of this component can be found in lib/referl_ui directory within the tool under emacs. In this directory 
     22you have to run make for compiling the source. To enable the new undo mode you had to set the  
     23refactorerl-undo-mode to selective-undo. 
     24 
     25==== Usage ==== 
     26The undo (redo) function is available in the Refactor menu with Undo 
     27(Redo) menu item. Calling the undo 
     28operation the program undoes the last change in the current file. Case refactoring  
     29the modifications will be rejected in every affected file, but in some cases can conflits arise. 
     30When you edit an affected file, or make one another refactoring, the system checks, if the second 
     31change affects the refactored area in the file. If the changes are overlapped, the undo reverts also this  
     32change, otherwise only the first one, and you get a merged state of the file. At more complex changes can  
     33also more changes get reversed. In both cases the changes can be redone until a newer modification. 
     34 
     35 
     36