Ignore:
Timestamp:
03/05/15 11:37:37 (9 years ago)
Author:
pharms
Message:
  • extended and corrected task comparison
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRule.java

    r1294 r1887  
    341341            } 
    342342            else { 
     343                // pressing a key on the same target, e.g. a text field, usually has the same 
     344                // semantics 
    343345                return TaskEquality.SEMANTICALLY_EQUAL; 
    344346            } 
     
    389391        } 
    390392         
     393        // performing drag and drops on the same target usually have the same semantic meaning, 
     394        // i.e., the same function is called 
    391395        return TaskEquality.SEMANTICALLY_EQUAL; 
    392396    } 
     
    459463            } 
    460464            else { 
     465                // in most situations, the coordinates are not of interest. But if they are, then 
     466                // the event can be at most semantically equal 
    461467                return TaskEquality.SEMANTICALLY_EQUAL; 
    462468            } 
     
    468474    /** 
    469475     * <p> 
    470      * compares two mouse button interactions such as clicks, mouse button down, or double clicks. 
    471      * If both interactions have the same coordinates, they are lexically equal. Otherwise, they 
    472      * are semantically equal. Mouse clicks for which the coordinates make no lexical difference 
    473      * (see {@link #clickCoordinatesMakeLexicalDifference(IEventTarget)}) are treated as 
    474      * lexically equal. 
    475      * </p> 
    476      * <p> 
    477      * The provided equality level can be used to restrict the quality check to the given level. 
    478      * This is done for optimization purposes. The returned equality level is as concrete as 
    479      * the provided one. It may be more concrete if there is no difference regarding the 
    480      * comparison on the levels. 
    481      * </p> 
    482      * 
    483      * @param interaction1  the first mouse button interaction to compare 
    484      * @param interaction2  the second mouse button interaction to compare 
    485      * @param eventTarget   the event target on which the interactions happened (used within 
    486      *                      special comparisons like mouse clicks on buttons, where the coordinates 
    487      *                      can be ignored) 
     476     * compares two scrolls and considers them as lexically equal if they have the same coordinates. 
     477     * Otherwise, they are syntactically equal as the happen on the same target 
     478     * </p> 
     479     * 
     480     * @param interaction1  the first scroll interaction to compare 
     481     * @param interaction2  the second scroll interaction to compare 
    488482     * @param equalityLevel the equality level to be checked for 
    489483     *  
     
    494488                                        TaskEquality equalityLevel) 
    495489    { 
    496         if (equalityLevel.isAtLeast(TaskEquality.SYNTACTICALLY_EQUAL)) { 
     490        if (equalityLevel.isAtLeast(TaskEquality.LEXICALLY_EQUAL)) { 
    497491            int x1 = interaction1.getXPosition(); 
    498492            int x2 = interaction2.getXPosition(); 
     
    505499        } 
    506500         
    507         return TaskEquality.SEMANTICALLY_EQUAL; 
     501        return TaskEquality.SYNTACTICALLY_EQUAL; 
    508502    } 
    509503 
Note: See TracChangeset for help on using the changeset viewer.