Changes between Version 12 and Version 13 of PRO_CHANGE_MANAGER_R0


Ignore:
Timestamp:
01/23/09 18:40:34 (16 years ago)
Author:
gogov
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PRO_CHANGE_MANAGER_R0

    v12 v13  
    66 
    77== Overview == 
    8 This task is related to the !UndoManager. The change manager is like the undo-manager, but allows skipping, unskipping etc. Currently we have an !UndoManger which will later become a change manager with the additional features described bellow. 
     8The Change Manager is meant to be a general manager for changes which supports a list of (mostly) all actions done in Sophie 2, implemented as changes. [[BR]] 
     9It's meant to provide undo and redo functionality to the application, as well as help implementing online collaboration. 
    910 
    10 skip change, unskip change, undo change,   
     11 * The Change Manager is meant to consist of a list of changes, and each of them should have a unique '''id''' (most likely a number) 
     12 * The '''id'''s of the changes need to be in increasing though not mandatory consecutive order 
     13 * Each of these changes should be able to handle 4 commands applied to them: 
     14  * undo 
     15  * redo 
     16  * skip 
     17  * unskip 
     18  
     19Right now only the UndoManager exists but later it could evolve to ChangeManager (or less possibly exist as a separate entity). 
    1120 
    1221== Task requirements == 
     
    1726  * undo/redo - the undo/redo mechanism should behave in a generally accepted manner as in most applications nowadays. 
    1827  * '''Important:''' 
    19    * skip/unskip and undo/redo are all going to be defined as changes. This way undoing a change can be skipped and later unskipped. Skipping a change can be undo. If one is unskipping the skip of the last change, that should act as if he/she is undoing the last change. 
     28   * skip/unskip and undo/redo are all going to be defined as changes. This way undoing a change can be skipped and later unskipped. Skipping a change can be undo. If one is unskipping the skip of the last change, that should act as  
     29if he/she is undoing the last change. 
    2030   * undo/redo should be possible to be skipped and unskipped. 
    2131   * skip/unskip should be possible to be undone and redone. 
     
    2333 
    2434== Task result == 
    25  * review of current source code. 
    26  * more source code. 
     35 * review of current source code 
     36 * more source code 
    2737 * unit tests 
    2838 
    2939== Implementation idea == 
    30  * review current code. 
    31  * add the new features. 
    32  * write unit tests. 
    33  '''Example scenarios - every number represents a change and its position in the list:''' 
     40 * review current code 
     41 * add the new features 
     42 * write unit tests 
     43 
     44=== Example scenarios === 
     45 * each command will have a number as an id 
     46 * these numbers should be in increasing order, though it's not mandatory for them to be consecutive. Every number represents a change and its position in the list: 
     47 * each '''''skip''''' and '''''unskip''''' command has a single number as argument which is the id of the command it's meant to affect 
     48 
    3449{{{ 
    3550   skip: 
     
    6883}}} 
    6984 
    70 '''Notes:''' 
    71  * skipping the previous change acts like a undo. 
    72  * unskipping the previous change acts like a redo. 
     85=== Notes === 
     86 * skipping the previous change acts like a undo 
     87 * unskipping the previous change acts like a redo 
     88 * in some cases some unskips act as opposite to certain skips, so they could be ruled out to increase performance but right now it's quite hard to deal with such cases, so this could possibly be reconsidered in a further revision of this task 
    7389 * there may be more interesting facts that can be observed. Design should take care of these... 
    7490 * Be careful to consider the !UnmanagedChange type - a change that is supposed to be managed in a special way. Its undo and redo will be implemented as the situation requires. For example - save a book may be a unmanaged change. If the user creates a frame with a movie content (with a media file of over 700Mb), deletes the frame, deletes the media file and requests a undo - the change may become a unmanaged. If the user had not deleted the media file the change would have been a normal change that can be undone. 
     91 * one can argue if actually all the four operations are needed internally but at least to the end user they should be available 
    7592 
    7693== Related == 
     
    8299 
    83100== How to demo == 
    84  
     101 * Show the skeleton code of the ChangeManager which is implemented 
     102 * Run the corresponding unit tests 
    85103= Design = 
    86104