Changes between Version 6 and Version 7 of TEXT_PERFORMANCE_R0


Ignore:
Timestamp:
05/14/10 15:20:36 (15 years ago)
Author:
kyli
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TEXT_PERFORMANCE_R0

    v6 v7  
    3434 
    3535= Design = 
    36  What should the test measure: 
     36What should the test measure: 
     37 
    3738 * Insert a large text in s frame (like a paste will do); 
    3839 * Simulate pressing left / right arrows (navigation); 
     
    4445 * write some more chars in the text. 
    4546 
    46  The test will extend SystemTestBase, since it is the only testbase that starts the whole app. Thus we will be able to take in mind other factors like halo menus. It will perform these things and print the result in milliseconds. Unnecessary modules will not be started (alternative skin, for example). All the measurements will be placed in one test case, since starting the app for every case will be very slow. 
     47The test will extend SystemTestBase, since it is the only testbase that starts the whole app. Thus we will be able to take in mind other factors like halo menus. It will perform these things and print the result in milliseconds. Unnecessary modules will not be started (alternative skin, for example). All the measurements will be placed in one test case, since starting the app for every case will be very slow. 
     48 
     49Create class SelectionInfo, which will hold the mark and caret positions. It will be immutable, 2 private final int fields - mark and caret. A default constructor will be provided, as well as getters for the mark and caret indices. Also, generated hashcode() and equals() and public static SelectionInfo DEFAULT = new SelectionInfo(-1, -1) (values are same to the current default values for the mark and caret); 
     50 
     51In BaseTextModel, delete mark() and caret(), instead create private RwProp<SelectionInfo> selectionInfo(), with a default value of SelectionInfo.DEFAULT. 
     52 
     53Replace getMark() and getCaret() with getSelectionInfo(). Replace setMark() and setCaret() with setSelectionInfo(). I think the purpose of these methods is clear, as is their usage.  
     54 
     55 
     56 
     57 
    4758 
    4859